mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-06 22:51:19 +00:00
Revert "[libc++] Fix error flags and exceptions propagated from input stream operations"
This reverts commits r357533 and r357531, which broke the LLDB data formatters. I'll hold off until we know how to fix the data formatters accordingly. llvm-svn: 357536
This commit is contained in:
1 parent
cc525c97b7
commit
38b7e74836
42 files changed
+547
-2494
No files matched your search
-39
@@ -18,7 +18,6 @@
|
||||
#include <cassert>
|
||||
|
||||
#include "min_allocator.h"
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
@@ -66,44 +65,6 @@ int main(int, char**)
|
||||
in >> s;
|
||||
assert(in.fail());
|
||||
}
|
||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||
{
|
||||
std::stringbuf sb;
|
||||
std::istream is(&sb);
|
||||
is.exceptions(std::ios::failbit);
|
||||
|
||||
bool threw = false;
|
||||
try {
|
||||
std::string s;
|
||||
is >> s;
|
||||
} catch (std::ios::failure const&) {
|
||||
threw = true;
|
||||
}
|
||||
|
||||
assert(!is.bad());
|
||||
assert(is.fail());
|
||||
assert(is.eof());
|
||||
assert(threw);
|
||||
}
|
||||
{
|
||||
std::stringbuf sb;
|
||||
std::istream is(&sb);
|
||||
is.exceptions(std::ios::eofbit);
|
||||
|
||||
bool threw = false;
|
||||
try {
|
||||
std::string s;
|
||||
is >> s;
|
||||
} catch (std::ios::failure const&) {
|
||||
threw = true;
|
||||
}
|
||||
|
||||
assert(!is.bad());
|
||||
assert(is.fail());
|
||||
assert(is.eof());
|
||||
assert(threw);
|
||||
}
|
||||
#endif // TEST_HAS_NO_EXCEPTIONS
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
|
||||
Reference in new issue
Block a user