Re: [PATCH] D21625: [libcxx] [test] Mark throw_bad_alloc_helper() as [[noreturn]].

2016-06-26 Thread Eric Fiselier via cfe-commits
EricWF accepted this revision.
EricWF added a comment.
This revision is now accepted and ready to land.

Accepting before closing.
I committed something similar in r273819. Please let me know if it doesn't work.


http://reviews.llvm.org/D21625



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D21625: [libcxx] [test] Mark throw_bad_alloc_helper() as [[noreturn]].

2016-06-26 Thread Eric Fiselier via cfe-commits
EricWF added a comment.

I don't think all the compilers libc++ tests with support `[[noreturn]]` yet. 
I'll commit a similar patch to this though.


http://reviews.llvm.org/D21625



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D21625: [libcxx] [test] Mark throw_bad_alloc_helper() as [[noreturn]].

2016-06-22 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

Mark throw_bad_alloc_helper() as [[noreturn]].

This avoids MSVC /analyze warnings about new returning null, since [[noreturn]] 
allows the analyzer to see what's happening.

http://reviews.llvm.org/D21625

Files:
  test/support/count_new.hpp

Index: test/support/count_new.hpp
===
--- test/support/count_new.hpp
+++ test/support/count_new.hpp
@@ -24,6 +24,9 @@
 
 namespace detail
 {
+#if TEST_STD_VER >= 11
+   [[noreturn]]
+#endif
inline void throw_bad_alloc_helper() {
 #ifndef TEST_HAS_NO_EXCEPTIONS
throw std::bad_alloc();


Index: test/support/count_new.hpp
===
--- test/support/count_new.hpp
+++ test/support/count_new.hpp
@@ -24,6 +24,9 @@
 
 namespace detail
 {
+#if TEST_STD_VER >= 11
+   [[noreturn]]
+#endif
inline void throw_bad_alloc_helper() {
 #ifndef TEST_HAS_NO_EXCEPTIONS
throw std::bad_alloc();
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits