diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-22 09:15:49 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-22 09:15:49 +0000 |
commit | 4cabd04e7571a5e543c6d112599f05ddf69efe9e (patch) | |
tree | f3e8b81f8db9a3f62c8a2ef50718a2928ebc0690 /clang/lib/Parse/ParseDecl.cpp | |
parent | e1c4a1babd90ea097ef80df44011e977212c2e78 (diff) | |
download | bcm5719-llvm-4cabd04e7571a5e543c6d112599f05ddf69efe9e.tar.gz bcm5719-llvm-4cabd04e7571a5e543c6d112599f05ddf69efe9e.zip |
Don't accidentally and silently accept C++11 attributes in decl-specifier-seqs
in C++98.
llvm-svn: 175879
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 8ac3c504e2f..6ab1540134a 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -2197,7 +2197,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, case tok::l_square: case tok::kw_alignas: - if (!isCXX11AttributeSpecifier()) + if (!getLangOpts().CPlusPlus11 || !isCXX11AttributeSpecifier()) goto DoneWithDeclSpec; ProhibitAttributes(attrs); |