diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-14 20:31:37 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-14 20:31:37 +0000 |
commit | 96bd62f7692d953fd06eccd9cff64f17df818eed (patch) | |
tree | 6b45da49590bf8090c9d9971d719e122e6b76bc6 /clang/lib/Parse/ParseTemplate.cpp | |
parent | 4a49dee2215469d14e06a3b4e7ba060b2eb9ec8e (diff) | |
download | bcm5719-llvm-96bd62f7692d953fd06eccd9cff64f17df818eed.tar.gz bcm5719-llvm-96bd62f7692d953fd06eccd9cff64f17df818eed.zip |
Reinstate r141898 (reverted in r141921), without the -Wc++98-compat-variadic-templates flag. Consensus is that -Wc++98-compat is a useful addition to clang, but per-C++11-feature warnings may not be.
Original patch by Jeffrey Yasskin.
llvm-svn: 141985
Diffstat (limited to 'clang/lib/Parse/ParseTemplate.cpp')
-rw-r--r-- | clang/lib/Parse/ParseTemplate.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp index 92fe4a5f335..3d68a4ab9db 100644 --- a/clang/lib/Parse/ParseTemplate.cpp +++ b/clang/lib/Parse/ParseTemplate.cpp @@ -475,8 +475,10 @@ Decl *Parser::ParseTypeParameter(unsigned Depth, unsigned Position) { Ellipsis = true; EllipsisLoc = ConsumeToken(); - if (!getLang().CPlusPlus0x) - Diag(EllipsisLoc, diag::ext_variadic_templates); + Diag(EllipsisLoc, + getLang().CPlusPlus0x + ? diag::warn_cxx98_compat_variadic_templates + : diag::ext_variadic_templates); } // Grab the template parameter name (if given) @@ -547,8 +549,10 @@ Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { if (Tok.is(tok::ellipsis)) { EllipsisLoc = ConsumeToken(); - if (!getLang().CPlusPlus0x) - Diag(EllipsisLoc, diag::ext_variadic_templates); + Diag(EllipsisLoc, + getLang().CPlusPlus0x + ? diag::warn_cxx98_compat_variadic_templates + : diag::ext_variadic_templates); } // Get the identifier, if given. |