[cfe-commits] r123854 - in /cfe/trunk: include/clang/Basic/DiagnosticCommonKinds.td lib/Lex/PPMacroExpansion.cpp test/Lexer/has_feature_cxx0x.cpp www/cxx_status.html

Douglas Gregor dgregor at apple.com
Wed Jan 19 14:11:51 PST 2011


Author: dgregor
Date: Wed Jan 19 16:11:50 2011
New Revision: 123854

URL: http://llvm.org/viewvc/llvm-project?rev=123854&view=rev
Log:
Variadic templates are fully implemented.

Turn on the __has_feature switch for variadic templates, document
their completion, and put the ExtWarn into the c++0x-extensions
warning group.

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

Modified: cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td?rev=123854&r1=123853&r2=123854&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td Wed Jan 19 16:11:50 2011
@@ -48,7 +48,7 @@
   "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<

Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=123854&r1=123853&r2=123854&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Wed Jan 19 16:11:50 2011
@@ -560,7 +560,7 @@
          //.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);
 }

Modified: cfe/trunk/test/Lexer/has_feature_cxx0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/has_feature_cxx0x.cpp?rev=123854&r1=123853&r2=123854&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/has_feature_cxx0x.cpp (original)
+++ cfe/trunk/test/Lexer/has_feature_cxx0x.cpp Wed Jan 19 16:11:50 2011
@@ -97,8 +97,9 @@
 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)

Modified: cfe/trunk/www/cxx_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_status.html?rev=123854&r1=123853&r2=123854&view=diff
==============================================================================
--- cfe/trunk/www/cxx_status.html (original)
+++ cfe/trunk/www/cxx_status.html Wed Jan 19 16:11:50 2011
@@ -441,16 +441,15 @@
 </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>





More information about the cfe-commits mailing list