EricWF created this revision.

This patch adds the `__cpp_variadic_using` feature test macro suggested in 
P0195r2. Note that this macro is not yet listed by SD-6.


https://reviews.llvm.org/D32948

Files:
  lib/Frontend/InitPreprocessor.cpp
  test/Lexer/cxx-features.cpp


Index: test/Lexer/cxx-features.cpp
===================================================================
--- test/Lexer/cxx-features.cpp
+++ test/Lexer/cxx-features.cpp
@@ -100,6 +100,10 @@
 #error "wrong value for __cpp_deduction_guides"
 #endif
 
+#if check(variadic_using, 0, 0, 0, 201611) // FIXME: provisional name
+#error "wrong value for __cpp_variadic_using"
+#endif
+
 // --- C++14 features ---
 
 #if check(binary_literals, 0, 0, 201304, 201304)
Index: lib/Frontend/InitPreprocessor.cpp
===================================================================
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -527,6 +527,7 @@
     Builder.defineMacro("__cpp_fold_expressions", "201603");
     // FIXME: This is not yet listed in SD-6.
     Builder.defineMacro("__cpp_deduction_guides", "201611");
+    Builder.defineMacro("__cpp_variadic_using", "201611");
   }
   if (LangOpts.AlignedAllocation)
     Builder.defineMacro("__cpp_aligned_new", "201606");


Index: test/Lexer/cxx-features.cpp
===================================================================
--- test/Lexer/cxx-features.cpp
+++ test/Lexer/cxx-features.cpp
@@ -100,6 +100,10 @@
 #error "wrong value for __cpp_deduction_guides"
 #endif
 
+#if check(variadic_using, 0, 0, 0, 201611) // FIXME: provisional name
+#error "wrong value for __cpp_variadic_using"
+#endif
+
 // --- C++14 features ---
 
 #if check(binary_literals, 0, 0, 201304, 201304)
Index: lib/Frontend/InitPreprocessor.cpp
===================================================================
--- lib/Frontend/InitPreprocessor.cpp
+++ lib/Frontend/InitPreprocessor.cpp
@@ -527,6 +527,7 @@
     Builder.defineMacro("__cpp_fold_expressions", "201603");
     // FIXME: This is not yet listed in SD-6.
     Builder.defineMacro("__cpp_deduction_guides", "201611");
+    Builder.defineMacro("__cpp_variadic_using", "201611");
   }
   if (LangOpts.AlignedAllocation)
     Builder.defineMacro("__cpp_aligned_new", "201606");
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to