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 | c6eb44b321c543c5bcf28727228a0cceced57e2e (patch) | |
tree | f6daa182be339a1118920f67d6225682c245fa6d /lib/Parse/ParseDecl.cpp | |
parent | f111d935722ed488144600cea5ed03a6b5069e8f (diff) |
C1X: implement static asserts
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 5e6c51c1ee..ee76cc73a5 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/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: |