[PATCH] D49863: [istream] Fix error flags and exceptions propagated from input stream operations
Louis Dionne via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 26 09:25:28 PDT 2018
ldionne created this revision.
ldionne added reviewers: mclow.lists, EricWF.
Herald added subscribers: cfe-commits, dexonsmith, christof.
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.
I will submit a paper in San Diego to clarify the Standard such that the
interpretation used in this commit (and other implementations) is the only
possible one.
https://bugs.llvm.org/show_bug.cgi?id=21586
https://bugs.llvm.org/show_bug.cgi?id=15949
rdar://problem/15347558
Repository:
rCXX libc++
https://reviews.llvm.org/D49863
Files:
libcxx/include/ios
libcxx/include/istream
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/bool.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/double.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/float.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_double.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long_long.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_int.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_long_long.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/unsigned_short.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/chart.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char_pointer.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char_pointer.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/wchar_t_pointer.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/peek.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/putback.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/unget.pass.cpp
libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp
libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim.pass.cpp
libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_extract.pass.cpp
libcxx/test/std/utilities/template.bitset/bitset.operators/stream_in.pass.cpp
libcxx/test/std/utilities/template.bitset/bitset.operators/stream_out.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49863.157506.patch
Type: text/x-patch
Size: 118912 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180726/0c676156/attachment-0001.bin>
More information about the cfe-commits
mailing list