Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / PCH / struct.c
blob3a78e077c116ee5240dd2f49236e1b81aca0bacb
1 // Test this without pch.
2 // RUN: %clang_cc1 -include %S/struct.h -fsyntax-only -verify %s
4 // Test with pch.
5 // RUN: %clang_cc1 -emit-pch -o %t %S/struct.h
6 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
8 struct Point *p1;
10 float getX(struct Point *p1) {
11 return p1->x;
14 void *get_fun_ptr(void) {
15 return fun->is_ptr? fun->ptr : 0;
18 struct Fun2 {
19 int very_fun;
22 int get_very_fun(void) {
23 return fun2->very_fun;
26 int *int_ptr_fail = &fun->is_ptr; // expected-error{{address of bit-field requested}}
28 struct Nested nested = { 1, 2 };