]> granicus.if.org Git - clang/commitdiff
fix PR6216
authorChris Lattner <sabre@nondot.org>
Wed, 3 Feb 2010 01:45:03 +0000 (01:45 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 3 Feb 2010 01:45:03 +0000 (01:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95185 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 371aba1719944c78c69afacef59244ebabc5b8a4..cb180ab7d323e386c436e44c968ec1a82850495a 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::comma:              // __builtin_offsetof(struct foo{...} ,
     // Storage-class specifiers
     case tok::kw_static:          // struct foo {...} static    x;
     case tok::kw_extern:          // struct foo {...} extern    x;
index edd68cc28c2514d776176b27483a5a4973a26395..7ec2a3c1ebb10aa8bd0f18855f073a6cd20dfa51 100644 (file)
@@ -75,3 +75,8 @@ struct test9 {
 // 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);
+}