From c2e1c1af8ffe750b827284f207b9207112c7cc4e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 3 Feb 2010 20:41:24 +0000 Subject: [PATCH] Declarators can have grouping parens. This fixes rdar://7608537. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95246 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/ParseDeclCXX.cpp | 1 + test/Parser/declarators.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index cb180ab7d3..f95fedc4e3 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -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 ::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; diff --git a/test/Parser/declarators.c b/test/Parser/declarators.c index 7ec2a3c1eb..6dd32d9676 100644 --- a/test/Parser/declarators.c +++ b/test/Parser/declarators.c @@ -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); -- 2.50.1