diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2019-08-27 14:41:39 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2019-08-27 14:41:39 +0000 |
| commit | 1d935220565e9ae0f0174dbf616b0042dc4d8df2 (patch) | |
| tree | 0384e639f779b64143bfe97af185d32db1fb2c2f /clang/lib | |
| parent | a393238422ecadf56826d4f1a3562fbf2dcab849 (diff) | |
| download | bcm5719-llvm-1d935220565e9ae0f0174dbf616b0042dc4d8df2.tar.gz bcm5719-llvm-1d935220565e9ae0f0174dbf616b0042dc4d8df2.zip | |
Replace some custom C11 extension warnings with the generic warning.
llvm-svn: 370066
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Parse/ParseDeclCXX.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 1375409a753..9b3b5c77ffa 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -3626,7 +3626,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, } case tok::kw__Noreturn: if (!getLangOpts().C11) - Diag(Loc, diag::ext_c11_noreturn); + Diag(Tok, diag::ext_c11_feature) << Tok.getName(); isInvalid = DS.setFunctionSpecNoreturn(Loc, PrevSpec, DiagID); break; diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index 8e69bb2295f..cf03ed6379c 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -862,7 +862,7 @@ Decl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd){ "Not a static_assert declaration"); if (Tok.is(tok::kw__Static_assert) && !getLangOpts().C11) - Diag(Tok, diag::ext_c11_static_assert); + Diag(Tok, diag::ext_c11_feature) << Tok.getName(); if (Tok.is(tok::kw_static_assert)) Diag(Tok, diag::warn_cxx98_compat_static_assert); diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 2eb8ff9a8b0..0ced0257c87 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -2733,11 +2733,10 @@ ExprResult Parser::ParseStringLiteralExpression(bool AllowUserDefinedLiteral) { /// \endverbatim ExprResult Parser::ParseGenericSelectionExpression() { assert(Tok.is(tok::kw__Generic) && "_Generic keyword expected"); - SourceLocation KeyLoc = ConsumeToken(); - if (!getLangOpts().C11) - Diag(KeyLoc, diag::ext_c11_generic_selection); + Diag(Tok, diag::ext_c11_feature) << Tok.getName(); + SourceLocation KeyLoc = ConsumeToken(); BalancedDelimiterTracker T(*this, tok::l_paren); if (T.expectAndConsume()) return ExprError(); |

