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 | 841804baff6ea8ba1904a2ba81265aae1479e882 (patch) | |
tree | 176a23845972db02399f3b1aeb59b228b87142e6 /lib/Parse/ParseDeclCXX.cpp | |
parent | ea523d73a6de06f828952a02f5ff86e4cc631695 (diff) |
Add -Wc++98-compat warnings for uses of the new keywords 'alignof', 'char16_t',
'char32_t', 'constexpr', 'decltype', 'noexcept', 'nullptr' and 'static_assert'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142302 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | lib/Parse/ParseDeclCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 45562d908c..7583ccafeb 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/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; |