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 | eecc6bc388e41d837bd95f4c019e375facf69597 (patch) | |
| tree | a4eca08c55e740cf6ca02508e414963872b8e5a8 | |
| parent | 9fb04015ffa1fdb73a6faf03779e5a6cf3257eba (diff) | |
| download | bcm5719-llvm-eecc6bc388e41d837bd95f4c019e375facf69597.tar.gz bcm5719-llvm-eecc6bc388e41d837bd95f4c019e375facf69597.zip | |
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.
llvm-svn: 123854
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticCommonKinds.td | 2 | ||||
| -rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Lexer/has_feature_cxx0x.cpp | 5 | ||||
| -rw-r--r-- | clang/www/cxx_status.html | 15 |
4 files changed, 12 insertions, 12 deletions
diff --git a/clang/include/clang/Basic/DiagnosticCommonKinds.td b/clang/include/clang/Basic/DiagnosticCommonKinds.td index ef5e452e7f4..49504e6e221 100644 --- a/clang/include/clang/Basic/DiagnosticCommonKinds.td +++ b/clang/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/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 247bbf47fcc..54e46913926 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/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/clang/test/Lexer/has_feature_cxx0x.cpp b/clang/test/Lexer/has_feature_cxx0x.cpp index c6c7787276a..5b0f79834ee 100644 --- a/clang/test/Lexer/has_feature_cxx0x.cpp +++ b/clang/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/clang/www/cxx_status.html b/clang/www/cxx_status.html index eaf951cd723..598ae2ef6b5 100644 --- a/clang/www/cxx_status.html +++ b/clang/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> |

