llvm-project/libcxx/test/std/strings/basic.string
Louis Dionne 396145d0da [libc++] Fix error flags and exceptions propagated from input stream operations
Summary:
This is a re-application of r357533 and r357531. They had been reverted
because we thought the commits broke the LLDB data formatters, but it
turns out this was because only r357531 had been included in the CI
run.

Before this patch, we would only ever throw an exception if the badbit
was set on the stream. The Standard is currently very unclear on how
exceptions should be propagated and what error flags should be set by
the input stream operations. This commit changes libc++ to behave under
a different (but valid) interpretation of the Standard. This interpretation
of the Standard matches what other implementations are doing.

This effectively implements the wording in p1264r0. It hasn't been voted
into the Standard yet, however there is wide agreement that the fix is
correct and it's just a matter of time before the fix is standardized.

PR21586
PR15949
rdar://problem/15347558

Reviewers: mclow.lists, EricWF

Subscribers: christof, dexonsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D49863

llvm-svn: 357775
2019-04-05 16:33:37 +00:00
..
string.access Mark 'front()' and 'back()' as noexcept for array/deque/string/string_view. These are just rebranded 'operator[]', and should be noexcept like it is. 2019-03-19 03:30:07 +00:00
string.capacity [libc++] Mark several tests as XFAIL on macosx10.7 2019-02-27 00:57:57 +00:00
string.cons [libcxx] [test] Fix test bugs in string.cons/copy_alloc.pass.cpp. 2019-04-03 00:05:49 +00:00
string.ends_with Support tests in freestanding 2019-02-04 20:31:13 +00:00
string.iterators Support tests in freestanding 2019-02-04 20:31:13 +00:00
string.modifiers [libc++] Mark several tests as XFAIL on macosx10.7 2019-02-27 00:57:57 +00:00
string.nonmembers [libc++] Fix error flags and exceptions propagated from input stream operations 2019-04-05 16:33:37 +00:00
string.ops [libc++] Mark several tests as XFAIL on macosx10.7 2019-02-27 00:57:57 +00:00
string.require Support tests in freestanding 2019-02-04 20:31:13 +00:00
string.starts_with Support tests in freestanding 2019-02-04 20:31:13 +00:00
allocator_mismatch.fail.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
char.bad.fail.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
input_iterator.h Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
test_traits.h Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
traits_mismatch.fail.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
types.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00