summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-10-22 04:27:47 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-10-22 04:27:47 +0000
commit3fa73f36028ee1c4874ffb387d83f59c7f246452 (patch)
treeda9a87d91d6ee99befe45efc39d66d1f10418109 /clang/test/Lexer
parent76a2d615add9ac345cf967e39b00cd365bb286c2 (diff)
downloadbcm5719-llvm-3fa73f36028ee1c4874ffb387d83f59c7f246452.tar.gz
bcm5719-llvm-3fa73f36028ee1c4874ffb387d83f59c7f246452.zip
[coroutines] Add feature-test macro for coroutines, defined to 1 to indicate
the implementation is incomplete. llvm-svn: 250982
Diffstat (limited to 'clang/test/Lexer')
-rw-r--r--clang/test/Lexer/cxx-features.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp
index 4ec4d55ac08..6c4a092b1c4 100644
--- a/clang/test/Lexer/cxx-features.cpp
+++ b/clang/test/Lexer/cxx-features.cpp
@@ -2,6 +2,7 @@
// RUN: %clang_cc1 -std=c++11 -verify %s
// RUN: %clang_cc1 -std=c++1y -fsized-deallocation -verify %s
// RUN: %clang_cc1 -std=c++1y -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s
+// RUN: %clang_cc1 -fcoroutines -DCOROUTINES -verify %s
// expected-no-diagnostics
@@ -128,3 +129,7 @@
#if check(experimental_concepts, 0, 0, CONCEPTS_TS)
#error "wrong value for __cpp_experimental_concepts"
#endif
+
+#if (COROUTINES && !__cpp_coroutines) || (!COROUTINES && __cpp_coroutines)
+#error "wrong value for __cpp_coroutines"
+#endif
OpenPOWER on IntegriCloud