diff options
author | Andy Gibbs <andyg1001@hotmail.co.uk> | 2013-04-03 09:46:04 +0000 |
---|---|---|
committer | Andy Gibbs <andyg1001@hotmail.co.uk> | 2013-04-03 09:46:04 +0000 |
commit | 74b9fa16e5d1e1a5f3adb065043db46ad20a4575 (patch) | |
tree | ca8e201c7864773196e594a34b67782c1d4466d1 /lib/Parse/ParseDecl.cpp | |
parent | f50f3f7cee281f4e59854b0f56a78abe02fcd25d (diff) |
Enable use of _Static_assert inside structs and unions in C11 mode (as per C11 6.7.2.1p1).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178632 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 589723a1d1..990a9097ac 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -3093,6 +3093,13 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc, continue; } + // Parse _Static_assert declaration. + if (Tok.is(tok::kw__Static_assert)) { + SourceLocation DeclEnd; + ParseStaticAssertDeclaration(DeclEnd); + continue; + } + if (!Tok.is(tok::at)) { struct CFieldCallback : FieldCallback { Parser &P; |