mclow.lists added a comment.
I just realized that this will break the following code:
try { __cxxabiv1:: __cxa_bad_cast(); }
catch ( std::bad_cast &ex ) {}
because what gets thrown is a `const std::bad_cast &`
Yes, people should catch by value or const reference.
But that doesn't mean that
weimingz added a comment.
Hi Marshall, do you have any comments?
http://reviews.llvm.org/D21706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
weimingz added inline comments.
Comment at: include/exception:262
@@ -261,3 +261,3 @@
_LIBCPP_INLINE_VISIBILITY
-inline void __libcpp_throw(_Exception const& __e) {
+inline __attribute__((noreturn)) void __libcpp_throw(_Exception const& __e) {
#ifndef _LIBCPP_NO_EXCEPTIONS
-
mclow.lists added a comment.
This is getting close. A nit, and a couple of non-trivial comments.
Comment at: include/exception:262
@@ -261,3 +261,3 @@
_LIBCPP_INLINE_VISIBILITY
-inline void __libcpp_throw(_Exception const& __e) {
+inline __attribute__((noreturn)) void __libcpp
weimingz updated this revision to Diff 62515.
weimingz marked 5 inline comments as done.
weimingz added a comment.
fix issues per Noel's suggestion
http://reviews.llvm.org/D21706
Files:
include/__functional_03
include/__locale
include/array
include/bitset
include/complex
include/deq
grandinj added inline comments.
Comment at: include/array:209
@@ -211,7 +208,3 @@
if (__n >= _Size)
-#ifndef _LIBCPP_NO_EXCEPTIONS
-throw out_of_range("array::at");
-#else
-assert(!"array::at out_of_range");
-#endif
+__libcpp_throw(out_of_range("array:
rmaprath added a comment.
Generally looks OK to me.
There are similar uses in test sources as well, but those can be taken care of
separately (I'm hoping to get back to the -fno-exceptions XFAILs soon).
http://reviews.llvm.org/D21706
___
cfe-commi
weimingz retitled this revision from "[libcxx] refactor for throw or assert" to
"[libcxx] refactor for throw".
weimingz updated the summary for this revision.
weimingz updated this revision to Diff 62470.
http://reviews.llvm.org/D21706
Files:
include/__functional_03
include/__locale
includ
weimingz added a comment.
In http://reviews.llvm.org/D21706#471091, @EricWF wrote:
> Please make the changes in the above comment.
Sure. I'm working on it. Just got interrupted/distracted by other tasks time to
time. :(
http://reviews.llvm.org/D21706
__
EricWF requested changes to this revision.
EricWF added a comment.
This revision now requires changes to proceed.
Please make the changes in the above comment.
http://reviews.llvm.org/D21706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
EricWF added a subscriber: EricWF.
EricWF added reviewers: mclow.lists, EricWF.
EricWF added a comment.
We actually have a non-macro that does this. It's called `__libcpp_throw` and
it lives in ``. Please use that instead.
http://reviews.llvm.org/D21706
__
weimingz added a comment.
Before replacing all throw/assert to macros, let's first check if we're on the
right path.
http://reviews.llvm.org/D21706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listin
12 matches
Mail list logo