diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2019-08-27 19:15:24 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2019-08-27 19:15:24 +0000 |
commit | 5f0d7648a30ecf9d250486ba0ea07d02f1accef3 (patch) | |
tree | 5ad3787dcc4c348c063630cc8a260e8fbaaafad1 /lib/Parse/ParseDecl.cpp | |
parent | fff88111a219083406a561e1ff22f0280f021d6b (diff) | |
download | clang-5f0d7648a30ecf9d250486ba0ea07d02f1accef3.tar.gz |
Diagnose both _Complex and _Imaginary as C99 extensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370100 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 9b3b5c77ff..6c3b6d6e62 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -3689,10 +3689,14 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, DiagID); break; case tok::kw__Complex: + if (!getLangOpts().C99) + Diag(Tok, diag::ext_c99_feature) << Tok.getName(); isInvalid = DS.SetTypeSpecComplex(DeclSpec::TSC_complex, Loc, PrevSpec, DiagID); break; case tok::kw__Imaginary: + if (!getLangOpts().C99) + Diag(Tok, diag::ext_c99_feature) << Tok.getName(); isInvalid = DS.SetTypeSpecComplex(DeclSpec::TSC_imaginary, Loc, PrevSpec, DiagID); break; |