diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2011-10-13 22:18:05 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2011-10-13 22:18:05 +0000 |
commit | 48a9d189bbc989369155195a4ce8c7e1c02ea02a (patch) | |
tree | b0eb8817f0f2f5ec02bdf5f42c3daa5a85079b40 /lib/Sema/SemaType.cpp | |
parent | 73fb35003aad027492e661a3749e921b5d1ecaf9 (diff) |
Implement the first piece of a -Wc++98-compat flag so that people can build in
C++11 mode but keep their sources compatible with C++98. This patch implements
the -Wc++98-compat-variadic-templates sub-flag and -Wc++98-compat to include
it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index cee4ed67a1..dc08320cad 100644 --- a/lib/Sema/SemaType.cpp +++ b/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: |