This revision was automatically updated to reflect the committed changes.
Closed by commit rL288660: Handle tests for noexcept that expect a false value
(authored by rogfer01).
Changed prior to commit:
https://reviews.llvm.org/D27310?vs=80238&id=80242#toc
Repository:
rL LLVM
https://reviews
rogfer01 updated this revision to Diff 80238.
rogfer01 added a comment.
Do not use constexpr.
https://reviews.llvm.org/D27310
Files:
test/libcxx/strings/iterators.exceptions.pass.cpp
Index: test/libcxx/strings/iterators.exceptions.pass.cpp
===
EricWF added inline comments.
Comment at: test/libcxx/strings/iterators.exceptions.pass.cpp:29
+#ifndef TEST_HAS_NO_EXCEPTIONS
+constexpr bool expected = false;
+#else
rogfer01 wrote:
> EricWF wrote:
> > We can't use constexpr because these tests run in C++03. Ho
rogfer01 added inline comments.
Comment at: test/libcxx/strings/iterators.exceptions.pass.cpp:29
+#ifndef TEST_HAS_NO_EXCEPTIONS
+constexpr bool expected = false;
+#else
EricWF wrote:
> We can't use constexpr because these tests run in C++03. However `const bool
EricWF added a comment.
Please address the inline comments before committing.
Comment at: test/libcxx/strings/iterators.exceptions.pass.cpp:29
+#ifndef TEST_HAS_NO_EXCEPTIONS
+constexpr bool expected = false;
+#else
We can't use constexpr because these tests ru
rogfer01 updated this revision to Diff 80235.
rogfer01 added a comment.
- Rewrite the adjusted tests in the way suggested by @EricWF
- Also check that this test works in a GCC-built libcxx
https://reviews.llvm.org/D27310
Files:
test/libcxx/strings/iterators.exceptions.pass.cpp
Index: test/l
EricWF accepted this revision.
EricWF added a comment.
This revision is now accepted and ready to land.
Have you tested this against GCC which has different noexcept semantics?
If so this LGTM minus possibly addressing the inline comments.
Comment at: test/libcxx/strings/itera
rogfer01 created this revision.
rogfer01 added reviewers: EricWF, mclow.lists, rmaprath.
rogfer01 added a subscriber: cfe-commits.
Under libcpp-no-exceptions, noexcept is trivially true. Some tests expect in
the usual setting to return false. Wrap these tests in a convenience macro.
https://rev