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

Chris Lattner sabre at nondot.org
Tue Feb 2 17:45:03 PST 2010


Author: lattner
Date: Tue Feb  2 19:45:03 2010
New Revision: 95185

URL: http://llvm.org/viewvc/llvm-project?rev=95185&view=rev
Log:
fix PR6216

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=95185&r1=95184&r2=95185&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Tue Feb  2 19:45:03 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::comma:              // __builtin_offsetof(struct foo{...} ,
     // Storage-class specifiers
     case tok::kw_static:          // struct foo {...} static    x;
     case tok::kw_extern:          // struct foo {...} extern    x;

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

==============================================================================
--- cfe/trunk/test/Parser/declarators.c (original)
+++ cfe/trunk/test/Parser/declarators.c Tue Feb  2 19:45:03 2010
@@ -75,3 +75,8 @@
 // PR6208
 struct test10 { int a; } static test10x;
 struct test11 { int a; } const test11x;
+
+// PR6216
+void test12() {
+  (void)__builtin_offsetof(struct { char c; int i; }, i);
+}





More information about the cfe-commits mailing list