diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-15 05:42:01 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-15 05:42:01 +0000 |
commit | 0aa86c0463a881be85fd34e04c7de3379997621d (patch) | |
tree | d7ca22480268c94ba0531ad35522a00970b932bd /lib/Sema/SemaType.cpp | |
parent | 7fe6208c3fa91f835813bb78236ef5c2bbf81053 (diff) |
Add -Wc++98-compat warning for deduced 'auto' type specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 2b563a50a9..d3a39967de 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1851,7 +1851,9 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, << Error; T = SemaRef.Context.IntTy; D.setInvalidType(true); - } + } else + SemaRef.Diag(D.getDeclSpec().getTypeSpecTypeLoc(), + diag::warn_cxx98_compat_auto_type_specifier); } if (SemaRef.getLangOptions().CPlusPlus && |