diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-19 22:11:50 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-19 22:11:50 +0000 |
commit | 4c9131ac2d0a65cb7c0179d438ae56f7978ab012 (patch) | |
tree | 846b3fdfe251112bad2e5853f8a641e16790469b | |
parent | 5ce5f5221217b64193799c2a4d5aa84432d3fba4 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123854 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/DiagnosticCommonKinds.td | 2 | ||||
-rw-r--r-- | lib/Lex/PPMacroExpansion.cpp | 2 | ||||
-rw-r--r-- | test/Lexer/has_feature_cxx0x.cpp | 5 | ||||
-rw-r--r-- | www/cxx_status.html | 15 |
4 files changed, 12 insertions, 12 deletions
diff --git a/include/clang/Basic/DiagnosticCommonKinds.td b/include/clang/Basic/DiagnosticCommonKinds.td index ef5e452e7f..49504e6e22 100644 --- a/include/clang/Basic/DiagnosticCommonKinds.td +++ b/include/clang/Basic/DiagnosticCommonKinds.td @@ -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< diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index 247bbf47fc..54e4691392 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/lib/Lex/PPMacroExpansion.cpp @@ -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); } diff --git a/test/Lexer/has_feature_cxx0x.cpp b/test/Lexer/has_feature_cxx0x.cpp index c6c7787276..5b0f79834e 100644 --- a/test/Lexer/has_feature_cxx0x.cpp +++ b/test/Lexer/has_feature_cxx0x.cpp @@ -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) diff --git a/www/cxx_status.html b/www/cxx_status.html index eaf951cd72..598ae2ef6b 100644 --- a/www/cxx_status.html +++ b/www/cxx_status.html @@ -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> |