From: Chris Lattner Date: Wed, 3 Feb 2010 01:45:03 +0000 (+0000) Subject: fix PR6216 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16acfee729e00536af827935ccfcf69be721e462;p=clang fix PR6216 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95185 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 371aba1719..cb180ab7d3 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::comma: // __builtin_offsetof(struct foo{...} , // Storage-class specifiers case tok::kw_static: // struct foo {...} static x; case tok::kw_extern: // struct foo {...} extern x; diff --git a/test/Parser/declarators.c b/test/Parser/declarators.c index edd68cc28c..7ec2a3c1eb 100644 --- a/test/Parser/declarators.c +++ b/test/Parser/declarators.c @@ -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); +}