diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-04-15 00:35:57 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-04-15 00:35:57 +0000 |
commit | 3d9cbdc3e66e274d5d3cb94ce81a65478d9baae0 (patch) | |
tree | 13a98c673af7fe0eb3f9912f050e3bc21b6b1bc5 /clang/lib/Parse/ParseDecl.cpp | |
parent | 91147596414d94e39c2d04a2f91a13bda877093c (diff) | |
download | bcm5719-llvm-3d9cbdc3e66e274d5d3cb94ce81a65478d9baae0.tar.gz bcm5719-llvm-3d9cbdc3e66e274d5d3cb94ce81a65478d9baae0.zip |
C1X: implement static asserts
llvm-svn: 129555
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 5e6c51c1ee9..ee76cc73a52 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -653,7 +653,7 @@ void Parser::DiagnoseProhibitedAttributes(ParsedAttributesWithRange &attrs) { /// [C++] namespace-definition /// [C++] using-directive /// [C++] using-declaration -/// [C++0x] static_assert-declaration +/// [C++0x/C1X] static_assert-declaration /// others... [FIXME] /// Parser::DeclGroupPtrTy Parser::ParseDeclaration(StmtVector &Stmts, @@ -688,6 +688,7 @@ Parser::DeclGroupPtrTy Parser::ParseDeclaration(StmtVector &Stmts, DeclEnd, attrs); break; case tok::kw_static_assert: + case tok::kw__Static_assert: ProhibitAttributes(attrs); SingleDecl = ParseStaticAssertDeclaration(DeclEnd); break; @@ -2923,6 +2924,9 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { // typedef-name case tok::annot_typename: + // static_assert-declaration + case tok::kw__Static_assert: + // GNU typeof support. case tok::kw_typeof: |