llvm-project/libcxx
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
..
benchmarks Add more benchmarks for literal strings. 2019-04-03 17:40:51 +00:00
cmake [CMake] Differentiate between static and shared libc++abi 2019-04-03 01:33:14 +00:00
docs libcxx: Add _LIBCPP_NODISCARD_EXT to 38 more functions 2019-04-03 18:13:08 +00:00
fuzzing Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
include [libc++] Fix error flags and exceptions propagated from input stream operations 2019-04-05 16:33:37 +00:00
lib [CMake] Differentiate between static and shared libc++abi 2019-04-03 01:33:14 +00:00
src Fix typo that I introduced in r357413. Thanks to ensadc@mailnesia.com for the catch. 2019-04-02 14:00:36 +00:00
test [libc++] Fix error flags and exceptions propagated from input stream operations 2019-04-05 16:33:37 +00:00
utils Handle TLS values in sym_check 2019-04-04 15:37:10 +00:00
www [libc++] Use std::is_nothrow_callable for std::invoke according to LWG 2807 2019-04-03 17:54:37 +00:00
.arcconfig [libcxx] Set up .arcconfig to point to new Diffusion CXX repository 2017-12-04 17:55:28 +00:00
.clang-format Make clang-format use C++03 syntax 2017-04-15 02:45:43 +00:00
.gitignore Implement N4606 optional 2016-10-12 07:46:20 +00:00
CMakeLists.txt [libc++][CMake] Allow merging libc++abi.a into libc++ even on Apple platforms 2019-03-25 14:56:29 +00:00
CREDITS.TXT Try again, this time with the correct address 2017-12-29 19:26:53 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
NOTES.TXT Reland "Use custom command and target to install libc++ headers" 2018-06-12 03:10:02 +00:00
TODO.TXT Add list of filesystem NB comments to TODO.TXT so they can be tracked separately 2017-03-06 21:23:36 +00:00
appveyor-reqs-install.cmd Attempt to upgrade compiler used by appveyor builds 2019-04-03 20:40:01 +00:00
appveyor.yml disable appveyor config for MSVC 2015 2019-04-03 20:36:51 +00:00