Declarators can have grouping parens. This fixes rdar://7608537.

llvm-svn: 95246
This commit is contained in:
Chris Lattner 2010-02-03 20:41:24 +00:00
parent 8c3f06d09c
commit 5e854b95f3
2 changed files with 4 additions and 0 deletions

View File

@ -942,6 +942,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
case tok::annot_cxxscope: // struct foo {...} a:: b;
case tok::annot_typename: // struct foo {...} a ::b;
case tok::annot_template_id: // struct foo {...} a<int> ::b;
case tok::l_paren: // struct foo {...} ( x);
case tok::comma: // __builtin_offsetof(struct foo{...} ,
// Storage-class specifiers
case tok::kw_static: // struct foo {...} static x;

View File

@ -80,3 +80,6 @@ struct test11 { int a; } const test11x;
void test12() {
(void)__builtin_offsetof(struct { char c; int i; }, i);
}
// rdar://7608537
struct test13 { int a; } (test13x);