]> granicus.if.org Git - clang/commitdiff
Variadic templates are fully implemented.
authorDouglas Gregor <dgregor@apple.com>
Wed, 19 Jan 2011 22:11:50 +0000 (22:11 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 19 Jan 2011 22:11:50 +0000 (22:11 +0000)
Turn on the __has_feature switch for variadic templates, document
their completion, and put the ExtWarn into the c++0x-extensions
warning group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123854 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticCommonKinds.td
lib/Lex/PPMacroExpansion.cpp
test/Lexer/has_feature_cxx0x.cpp
www/cxx_status.html

index ef5e452e7f4defc517b427b9c5376b30b742f9e4..49504e6e2219e6b3abb482ec55cc30155a4b919e 100644 (file)
@@ -48,7 +48,7 @@ def err_invalid_storage_class_in_func_decl : Error<
   "invalid storage class specifier in function declarator">;
 def err_expected_namespace_name : Error<"expected namespace name">;
 def ext_variadic_templates : ExtWarn<
-  "variadic templates are a C++0x extension">;
+  "variadic templates are a C++0x extension">, InGroup<CXX0x>;
 
 // Sema && Lex
 def ext_longlong : Extension<
index 247bbf47fccb89fc0da3d714b5b36c166ce8933b..54e46913926d2a424b54836097a9f5873964dd35 100644 (file)
@@ -560,7 +560,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
          //.Case("cxx_lambdas", false)
          //.Case("cxx_nullptr", false)
          //.Case("cxx_rvalue_references", false)
-         //.Case("cxx_variadic_templates", false)
+           .Case("cxx_variadic_templates", LangOpts.CPlusPlus)
            .Case("tls", PP.getTargetInfo().isTLSSupported())
            .Default(false);
 }
index c6c7787276a2e82697e327afb8eba0d2969bfab7..5b0f79834eee0e3501f104aa9e8b7e31779fe0f1 100644 (file)
@@ -97,8 +97,9 @@ int variadic_templates();
 int no_variadic_templates();
 #endif
 
-// CHECK-0X: no_variadic_templates
-// CHECK-NO-0X: no_variadic_templates
+// CHECK-0X: variadic_templates
+// Note: We allow variadic templates in C++98/03 with a warning.
+// CHECK-NO-0X: variadic_templates
 
 
 #if __has_feature(cxx_inline_namespaces)
index eaf951cd723307fc326c639ecbeac867cfe63863..598ae2ef6b56c615bfa85ad89380bdf2a7aac7e0 100644 (file)
@@ -441,16 +441,15 @@ welcome!</p>
 </tr>
 <tr>
   <td>variadic templates</td>
-  <td></td>
-  <td></td>
-  <td></td>
-  <td></td>
+  <td class="complete" align="center"></td>
+  <td class="complete" align="center"></td>
+  <td class="complete" align="center"></td>
+  <td class="complete" align="center"></td>
   <td>14.6.3</td>
-  <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2151.pdf">N2151</a>
-      <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2080.pdf">N2080</a>
+  <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2080.pdf">N2080</a>
       <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2087.pdf">N2087</a>
-      <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2772.pdf">N2772</a>
-      <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2551.pdf">N2551</a>
+    <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf">N2242</a>
+    <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2488.pdf">N2488</a>
   </td>
 </tr>
 <tr>