summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-14 20:31:37 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-14 20:31:37 +0000
commit96bd62f7692d953fd06eccd9cff64f17df818eed (patch)
tree6b45da49590bf8090c9d9971d719e122e6b76bc6 /clang/lib/Sema
parent4a49dee2215469d14e06a3b4e7ba060b2eb9ec8e (diff)
downloadbcm5719-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/Sema')
-rw-r--r--clang/lib/Sema/SemaType.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index cee4ed67a1f..dc08320cad7 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -2488,8 +2488,11 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
// it expands those parameter packs.
if (T->containsUnexpandedParameterPack())
T = Context.getPackExpansionType(T, llvm::Optional<unsigned>());
- else if (!LangOpts.CPlusPlus0x)
- S.Diag(D.getEllipsisLoc(), diag::ext_variadic_templates);
+ else
+ S.Diag(D.getEllipsisLoc(),
+ LangOpts.CPlusPlus0x
+ ? diag::warn_cxx98_compat_variadic_templates
+ : diag::ext_variadic_templates);
break;
case Declarator::FileContext:
OpenPOWER on IntegriCloud