rmaprath added inline comments.
Comment at: test/support/noexcept.h:23
@@ +22,3 @@
+// tests use multiple catch statements, in those cases we have to use the
+// _LIBCPP_NO_EXCEPTIONS macro and exclude the additional catch statements.
+#ifndef _LIBCPP_NO_EXCEPTIONS
mclow.lists added inline comments.
Comment at: include/__config:847
@@ +846,3 @@
+}
+#define _LIBCPP_THROW(E, MSG) __libcxx_noexceptions_report(MSG)
+#else // !_LIBCPP_NO_EXCEPTIONS
I don't care for having to specify something twice. (E, MSG). Maybe
rmaprath updated this revision to Diff 45868.
rmaprath added a comment.
Re-based on trunk. Trivial.
http://reviews.llvm.org/D14653
Files:
include/__config
include/array
test/std/containers/sequences/array/at.pass.cpp
test/support/noexcept.h
test/support/test_allocator.h
Index:
rmaprath updated this revision to Diff 43237.
rmaprath added a comment.
Addressing review comments by @mclow.lists:
- Introduced `TEST_TRY` and `TEST_CATCH` macros to avoid the non-standard
`#define try/catch`.
http://reviews.llvm.org/D14653
Files:
include/__config
include/array
rmaprath marked an inline comment as done.
rmaprath added a comment.
http://reviews.llvm.org/D14653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mclow.lists added inline comments.
Comment at: test/support/noexcept.h:43
@@ +42,3 @@
+#define try if(!setjmp(try_buf))
+#define catch(ex) else
+
This is explicitly forbidden by the standard.
[macro.names]/2:
A translation unit shall not #define or #undef names
rmaprath updated this revision to Diff 42977.
rmaprath added a comment.
Two minor additions:
- Introduced a `TEST_THROW` macro for those tests that need to throw exceptions
(Note:- not using the `_LIBCPP_THROW` macro here as we want to keep the tests
independent of the standard library
rmaprath marked 2 inline comments as done.
rmaprath added a comment.
http://reviews.llvm.org/D14653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rmaprath updated this revision to Diff 42694.
rmaprath added a comment.
Simplified the changes to `__config` header.
http://reviews.llvm.org/D14653
Files:
include/__config
include/array
test/std/containers/sequences/array/at.pass.cpp
test/support/noexcept.h
Index:
rmaprath updated this revision to Diff 42701.
rmaprath added a comment.
Further refined the changes to `__config` header.
- Now there's only one `_LIBCPP_THROW` macro, which does the right thing
depending on the availability of exceptions.
- Made `__libcxx_noexceptions_report` not take in the
rmaprath added a comment.
In http://reviews.llvm.org/D14653#306675, @EricWF wrote:
> - I like the approach taken in the library. `__throw_helper` and
> `__libcxx_noexceptions_abort()`. However I don't like that they are in their
> own header. We should find another header for these to live in.
rmaprath updated this revision to Diff 42440.
rmaprath added a comment.
Addressing review comments by @EricWF:
- Introduced `_LIBCPP_THROW` macro to appropriately throw or call the
no-exceptions report routine to handle the exceptional situation (avoid the
overhead of a function call in the
EricWF added a comment.
Before you spend time changing the tests to use `TEST_TRY`/`TEST_CATCH` I would
like somebody else to weigh in. I don't really think my solution is that great
either. @jroelofs, @mclow any thoughts?
A couple of more thoughts:
- Forget what I said about putting it in .
EricWF added a reviewer: EricWF.
EricWF added a comment.
Sorry I'm late to this party. Please let me know if my concerns have already
been discussed.
First, thanks for taking on all this work. Getting the test suite passing
without exceptions is a tall order.
My two cents:
- I like the
rmaprath updated this revision to Diff 42175.
rmaprath added a comment.
Addressing review comments by @mclow.lists:
Got rid of the `__noexcept` header by moving the `__throw_helper` function into
the `__config` header. The `__libcxx_noexceptions_abort` function now takes in
an extra parameter
jroelofs added inline comments.
Comment at: test/support/noexcept.h:10
@@ +9,3 @@
+//===--===//
+#ifdef _LIBCPP_NO_EXCEPTIONS
+
You should also add a header guard so that this doesn't get
rmaprath updated this revision to Diff 42178.
rmaprath added a comment.
Added a header guard to the `noexcept.h` test support header (review comment by
@jroelofs).
http://reviews.llvm.org/D14653
Files:
include/__config
include/array
test/std/containers/sequences/array/at.pass.cpp
rmaprath added a comment.
Ping?
http://reviews.llvm.org/D14653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rmaprath added a comment.
Ping?
http://reviews.llvm.org/D14653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rmaprath added a comment.
Gentle ping.
http://reviews.llvm.org/D14653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rmaprath updated this revision to Diff 40767.
rmaprath added a comment.
Addressing review comments:
- Fixed a couple of typos.
- Made the use of the thread-local storage specifier a bit more flexible to
allow testing on few other configurations.
http://reviews.llvm.org/D14653
Files:
scott-0 added a subscriber: scott-0.
scott-0 added a comment.
It would be nice if the no-exceptions library called an intermediate helper,
for example `__libcxx_noexceptions_abort()`, instead of calling `abort()`
directly. Then the user and the tests could provide a replacement for
22 matches
Mail list logo