summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer
diff options
context:
space:
mode:
authorSaar Raz <saar@raz.email>2020-01-24 00:43:22 +0200
committerSaar Raz <saar@raz.email>2020-01-24 02:28:33 +0200
commit2ec65e229314d468006998eaef7074b86ef7482d (patch)
treeb40b8f4c158de29132f5c6ff17d804273a68e3c9 /clang/test/Lexer
parent29f14c1df25992db8c908e441c69e1fd4d4e4010 (diff)
downloadbcm5719-llvm-2ec65e229314d468006998eaef7074b86ef7482d.tar.gz
bcm5719-llvm-2ec65e229314d468006998eaef7074b86ef7482d.zip
[Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2a
Now with concepts support merged and mostly complete, we do not need -fconcepts-ts (which was also misleading as we were not implementing the TS) and can enable concepts features under C++2a. A warning will be generated if users still attempt to use -fconcepts-ts. (cherry picked from commit 67c608a9695496cfc9d3fdf9d0b12b554ac6b4df)
Diffstat (limited to 'clang/test/Lexer')
-rw-r--r--clang/test/Lexer/cxx-features.cpp10
-rw-r--r--clang/test/Lexer/keywords_test.cpp5
2 files changed, 7 insertions, 8 deletions
diff --git a/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp
index 05f77991fa3..8b9cb543473 100644
--- a/clang/test/Lexer/cxx-features.cpp
+++ b/clang/test/Lexer/cxx-features.cpp
@@ -5,7 +5,7 @@
// RUN: %clang_cc1 -std=c++2a -fcxx-exceptions -fsized-deallocation -verify %s
//
// RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -frelaxed-template-template-args -DRELAXED_TEMPLATE_TEMPLATE_ARGS=1 -verify %s
-// RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s
+// RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -DCONCEPTS_TS=1 -verify %s
// RUN: %clang_cc1 -std=c++14 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS -fsized-deallocation
// RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify -fsized-deallocation %s
// RUN: %clang_cc1 -std=c++14 -fchar8_t -DNO_EXCEPTIONS -DCHAR8_T -verify -fsized-deallocation %s
@@ -68,6 +68,10 @@
// init_captures checked below
+#if check(concepts, 0, 0, 0, 0, 201907)
+#error "wrong value for __cpp_concepts"
+#endif
+
// --- C++17 features ---
#if check(hex_float, 0, 0, 0, 201603, 201603)
@@ -297,10 +301,6 @@
// --- TS features --
-#if check(experimental_concepts, 0, 0, CONCEPTS_TS, CONCEPTS_TS, CONCEPTS_TS)
-#error "wrong value for __cpp_experimental_concepts"
-#endif
-
#if defined(COROUTINES) ? check(coroutines, 201703L, 201703L, 201703L, 201703L, 201703L) : check(coroutines, 0, 0, 0, 0, 201703L)
#error "wrong value for __cpp_coroutines"
#endif
diff --git a/clang/test/Lexer/keywords_test.cpp b/clang/test/Lexer/keywords_test.cpp
index 4c6ccca3f7e..952d7041fdc 100644
--- a/clang/test/Lexer/keywords_test.cpp
+++ b/clang/test/Lexer/keywords_test.cpp
@@ -1,6 +1,5 @@
// RUN: %clang_cc1 -std=c++03 -fsyntax-only %s
// RUN: %clang_cc1 -std=c++11 -DCXX11 -fsyntax-only %s
-// RUN: %clang_cc1 -std=c++14 -fconcepts-ts -DCXX11 -DCONCEPTS -fsyntax-only %s
// RUN: %clang_cc1 -std=c++2a -DCXX11 -DCXX2A -fsyntax-only %s
// RUN: %clang_cc1 -std=c++03 -fdeclspec -DDECLSPEC -fsyntax-only %s
// RUN: %clang_cc1 -std=c++03 -fms-extensions -DDECLSPEC -fsyntax-only %s
@@ -20,7 +19,7 @@
#define NOT_KEYWORD(NAME) _Static_assert(__is_identifier(NAME), #NAME)
#define IS_TYPE(NAME) void is_##NAME##_type() { int f(NAME); }
-#if defined(CONCEPTS) || defined(CXX2A)
+#if defined(CXX2A)
#define CONCEPTS_KEYWORD(NAME) IS_KEYWORD(NAME)
#else
#define CONCEPTS_KEYWORD(NAME) NOT_KEYWORD(NAME)
@@ -59,7 +58,7 @@ IS_KEYWORD(static_assert);
#endif
CXX11_KEYWORD(thread_local);
-// Concepts TS keywords
+// Concepts keywords
CONCEPTS_KEYWORD(concept);
CONCEPTS_KEYWORD(requires);
OpenPOWER on IntegriCloud