summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-26 19:42:59 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-26 19:42:59 +0000
commit3740071be01c10a387f12c01194e6cde2e8299bb (patch)
tree459ee8c50e8866801f1151534557f40f1c3f0e08
parent95b5ac7df9f5c5936639f57390edcb180fe547a4 (diff)
downloadbcm5719-llvm-3740071be01c10a387f12c01194e6cde2e8299bb.tar.gz
bcm5719-llvm-3740071be01c10a387f12c01194e6cde2e8299bb.zip
Add [[noreturn]] attribute to throw_bad_alloc_helper().
llvm-svn: 273819
-rw-r--r--libcxx/test/support/count_new.hpp5
-rw-r--r--libcxx/test/support/test_macros.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/libcxx/test/support/count_new.hpp b/libcxx/test/support/count_new.hpp
index 580e67505df..923e4951348 100644
--- a/libcxx/test/support/count_new.hpp
+++ b/libcxx/test/support/count_new.hpp
@@ -16,14 +16,13 @@
#include "test_macros.h"
-#if TEST_HAS_FEATURE(address_sanitizer) \
- || TEST_HAS_FEATURE(memory_sanitizer) \
- || TEST_HAS_FEATURE(thread_sanitizer)
+#if defined(TEST_HAS_SANITIZERS)
#define DISABLE_NEW_COUNT
#endif
namespace detail
{
+ TEST_NORETURN
inline void throw_bad_alloc_helper() {
#ifndef TEST_HAS_NO_EXCEPTIONS
throw std::bad_alloc();
diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h
index 10b55006658..ada4a961ab0 100644
--- a/libcxx/test/support/test_macros.h
+++ b/libcxx/test/support/test_macros.h
@@ -86,6 +86,12 @@
#define TEST_HAS_SANITIZERS
#endif
+#if defined(_LIBCPP_NORETURN)
+#define TEST_NORETURN _LIBCPP_NORETURN
+#else
+#define TEST_NORETURN [[noreturn]]
+#endif
+
/* Macros for testing libc++ specific behavior and extensions */
#if defined(_LIBCPP_VERSION)
#define LIBCPP_ASSERT(...) assert(__VA_ARGS__)
OpenPOWER on IntegriCloud