diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2019-08-27 20:33:05 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2019-08-27 20:33:05 +0000 |
| commit | 27e66bf710951ec8574a4ecc0770456c794ffef8 (patch) | |
| tree | a223644519b8bb3d7ff1b7912da1ec00c10d0c1f /clang/lib | |
| parent | 528f5da6d862f59c6e005f85eb32a0c67f65bc4d (diff) | |
| download | bcm5719-llvm-27e66bf710951ec8574a4ecc0770456c794ffef8.tar.gz bcm5719-llvm-27e66bf710951ec8574a4ecc0770456c794ffef8.zip | |
Diagnose _Bool as a C99 extension.
llvm-svn: 370108
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 6c3b6d6e62a..c4c5045d2fe 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -3777,6 +3777,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, break; case tok::kw_bool: case tok::kw__Bool: + if (Tok.is(tok::kw__Bool) && !getLangOpts().C99) + Diag(Tok, diag::ext_c99_feature) << Tok.getName(); + if (Tok.is(tok::kw_bool) && DS.getTypeSpecType() != DeclSpec::TST_unspecified && DS.getStorageClassSpec() == DeclSpec::SCS_typedef) { |

