[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / PCH / field-designator.c
blobf0486ec162d5f56c56774917b995733bc45e7749
1 // RUN: %clang_cc1 %s -include %s
2 // RUN: %clang_cc1 %s -emit-pch -o %t.pch
3 // RUN: %clang_cc1 %s -include-pch %t.pch
5 // rdar://12239321 Make sure we don't emit a bogus
6 // error: field designator 'e' does not refer to a non-static data member
8 #ifndef HEADER
9 #define HEADER
10 //===----------------------------------------------------------------------===//
12 struct U {
13 union {
14 struct {
15 int e;
16 int f;
19 int a;
23 //===----------------------------------------------------------------------===//
24 #else
25 #if !defined(HEADER)
26 # error Header inclusion order messed up
27 #endif
28 //===----------------------------------------------------------------------===//
30 void bar(void) {
31 static const struct U plan = { .e = 1 };
34 //===----------------------------------------------------------------------===//
35 #endif