]> granicus.if.org Git - clang/commitdiff
Declarators can have grouping parens. This fixes rdar://7608537.
authorChris Lattner <sabre@nondot.org>
Wed, 3 Feb 2010 20:41:24 +0000 (20:41 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 3 Feb 2010 20:41:24 +0000 (20:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95246 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseDeclCXX.cpp
test/Parser/declarators.c

index cb180ab7d323e386c436e44c968ec1a82850495a..f95fedc4e3a2b96579abea111bbe8a14715170b4 100644 (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;
index 7ec2a3c1ebb10aa8bd0f18855f073a6cd20dfa51..6dd32d9676b807fd1277f887e10eb5b82ce84dbb 100644 (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);