aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-03 01:45:03 +0000
committerChris Lattner <sabre@nondot.org>2010-02-03 01:45:03 +0000
commit16acfee729e00536af827935ccfcf69be721e462 (patch)
tree5e820a450edb5ff32bf19d744da4f6db5740ec25
parentda1573f95902a42aa4d11e8f45ab98ec7e27bc28 (diff)
fix PR6216
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95185 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Parse/ParseDeclCXX.cpp1
-rw-r--r--test/Parser/declarators.c5
2 files changed, 6 insertions, 0 deletions
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<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;
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);
+}