[llvm-branch-commits] [clang] 939ba0b - Add tests for the absence of feature test macros for features we don't

Richard Smith via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Dec 18 13:47:46 PST 2020


Author: Richard Smith
Date: 2020-12-18T13:42:23-08:00
New Revision: 939ba0b501b27a2535c9bb62b6f6dc027d49f76d

URL: https://github.com/llvm/llvm-project/commit/939ba0b501b27a2535c9bb62b6f6dc027d49f76d
DIFF: https://github.com/llvm/llvm-project/commit/939ba0b501b27a2535c9bb62b6f6dc027d49f76d.diff

LOG: Add tests for the absence of feature test macros for features we don't
support yet.

Added: 
    

Modified: 
    clang/test/Lexer/cxx-features.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp
index afc3b56d8a37..852c53449568 100644
--- a/clang/test/Lexer/cxx-features.cpp
+++ b/clang/test/Lexer/cxx-features.cpp
@@ -28,16 +28,30 @@
 
 // --- C++20 features ---
 
+#if check(aggregate_paren_init, 0, 0, 0, 0, 0)
+// FIXME: 201902 in C++20
+#error "wrong value for __cpp_aggregate_paren_init"
+#endif
+
 #if defined(CHAR8_T) ? check(char8_t, 201811, 201811, 201811, 201811, 201811) : \
     defined(NO_CHAR8_T) ? check(char8_t, 0, 0, 0, 0, 0) : \
     check(char8_t, 0, 0, 0, 0, 201811)
 #error "wrong value for __cpp_char8_t"
 #endif
 
+#if check(concepts, 0, 0, 0, 0, 201907)
+#error "wrong value for __cpp_concepts"
+#endif
+
 #if check(conditional_explicit, 0, 0, 0, 0, 201806)
 #error "wrong value for __cpp_conditional_explicit"
 #endif
 
+#if check(consteval, 0, 0, 0, 0, 0)
+// FIXME: 201811 in C++20
+#error "wrong value for __cpp_consteval"
+#endif
+
 // constexpr checked below
 
 #if check(constexpr_dynamic_alloc, 0, 0, 0, 0, 201907)
@@ -52,6 +66,8 @@
 #error "wrong value for __cpp_constinit"
 #endif
 
+// deduction_guides checked below
+
 #if check(designated_initializers, 0, 0, 0, 0, 201707)
 #error "wrong value for __cpp_designated_initializers"
 #endif
@@ -68,8 +84,14 @@
 
 // init_captures checked below
 
-#if check(concepts, 0, 0, 0, 0, 201907)
-#error "wrong value for __cpp_concepts"
+#if check(modules, 0, 0, 0, 0, 0)
+// FIXME: 201907 in C++20
+#error "wrong value for __cpp_modules"
+#endif
+
+#if check(using_enum, 0, 0, 0, 0, 0)
+// FIXME: 201907 in C++20
+#error "wrong value for __cpp_using_enum"
 #endif
 
 // --- C++17 features ---
@@ -113,6 +135,7 @@
 // static_assert checked below
 
 #if check(deduction_guides, 0, 0, 0, 201703, 201703)
+// FIXME: 201907 in C++20
 #error "wrong value for __cpp_deduction_guides"
 #endif
 


        


More information about the llvm-branch-commits mailing list