Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-12 Thread Marshall Clow via cfe-commits
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

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-11 Thread Weiming Zhao via cfe-commits
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

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-01 Thread Weiming Zhao via 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 -

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-01 Thread Marshall Clow via cfe-commits
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

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-01 Thread Weiming Zhao via cfe-commits
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

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-01 Thread Noel Grandin via cfe-commits
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:

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-01 Thread Asiri Rathnayake via cfe-commits
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

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-06-30 Thread Weiming Zhao via cfe-commits
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

Re: [PATCH] D21706: [libcxx] refactor for throw or assert

2016-06-30 Thread Weiming Zhao via cfe-commits
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 __

Re: [PATCH] D21706: [libcxx] refactor for throw or assert

2016-06-29 Thread Eric Fiselier via cfe-commits
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

Re: [PATCH] D21706: [libcxx] refactor for throw or assert

2016-06-24 Thread Eric Fiselier via cfe-commits
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 __

Re: [PATCH] D21706: [libcxx] refactor for throw or assert

2016-06-24 Thread Weiming Zhao via cfe-commits
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