[cfe-commits] r95246 - in /cfe/trunk: lib/Parse/ParseDeclCXX.cpp test/Parser/declarators.c

Chris Lattner sabre at nondot.org
Wed Feb 3 12:41:24 PST 2010


Author: lattner
Date: Wed Feb  3 14:41:24 2010
New Revision: 95246

URL: http://llvm.org/viewvc/llvm-project?rev=95246&view=rev
Log:
Declarators can have grouping parens.  This fixes rdar://7608537.

Modified:
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp
    cfe/trunk/test/Parser/declarators.c

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=95246&r1=95245&r2=95246&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Wed Feb  3 14:41:24 2010
@@ -942,6 +942,7 @@
     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;

Modified: cfe/trunk/test/Parser/declarators.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/declarators.c?rev=95246&r1=95245&r2=95246&view=diff

==============================================================================
--- cfe/trunk/test/Parser/declarators.c (original)
+++ cfe/trunk/test/Parser/declarators.c Wed Feb  3 14:41:24 2010
@@ -80,3 +80,6 @@
 void test12() {
   (void)__builtin_offsetof(struct { char c; int i; }, i);
 }
+
+// rdar://7608537
+struct test13 { int a; } (test13x);





More information about the cfe-commits mailing list