[PATCH] D21706: [libcxx] refactor for throw
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 1 12:57:03 PDT 2016
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_throw(_Exception const& __e) {
#ifndef _LIBCPP_NO_EXCEPTIONS
----------------
I thought that we were going to add a macro for the "no return if no exceptions"
================
Comment at: src/future.cpp:96
@@ -96,4 +95,3 @@
if (__has_value())
- throw future_error(make_error_code(future_errc::promise_already_satisfied));
-#endif
+ __libcpp_throw(future_error(make_error_code(future_errc::promise_already_satisfied)));
__state_ |= __constructed | ready;
----------------
Is the indentation right here? (or is phab lying to me?)
================
Comment at: src/locale.cpp:527
@@ -528,3 +526,3 @@
#else // _LIBCPP_NO_EXCEPTIONS
: __locale_(new __imp(*other.__locale_, name, c))
#endif
----------------
Did you miss one here?
http://reviews.llvm.org/D21706
More information about the cfe-commits
mailing list