diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-17 23:06:20 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-17 23:06:20 +0000 |
commit | b15c11c8190775de46e1c9973c032f63c7096940 (patch) | |
tree | 1981585f8df92d7933a63f2b1b06adadb5462eb5 /clang/lib/Parse/ParseDeclCXX.cpp | |
parent | 1d617acef9f102629b736db06a5b5def0e116297 (diff) | |
download | bcm5719-llvm-b15c11c8190775de46e1c9973c032f63c7096940.tar.gz bcm5719-llvm-b15c11c8190775de46e1c9973c032f63c7096940.zip |
Add -Wc++98-compat warnings for uses of the new keywords 'alignof', 'char16_t',
'char32_t', 'constexpr', 'decltype', 'noexcept', 'nullptr' and 'static_assert'.
llvm-svn: 142302
Diffstat (limited to 'clang/lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDeclCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index 45562d908c5..7583ccafeb9 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -587,6 +587,8 @@ Decl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd){ if (Tok.is(tok::kw__Static_assert) && !getLang().C1X) Diag(Tok, diag::ext_c1x_static_assert); + if (Tok.is(tok::kw_static_assert)) + Diag(Tok, diag::warn_cxx98_compat_static_assert); SourceLocation StaticAssertLoc = ConsumeToken(); @@ -2401,6 +2403,8 @@ Parser::MaybeParseExceptionSpecification(SourceRange &SpecificationRange, if (Tok.isNot(tok::kw_noexcept)) return Result; + Diag(Tok, diag::warn_cxx98_compat_noexcept_decl); + // If we already had a dynamic specification, parse the noexcept for, // recovery, but emit a diagnostic and don't store the results. SourceRange NoexceptRange; |