In the latest episode of "Deserializing bugs caused by accessors" the series reached...
[clang.git] / test / PCH / variables.c
blob58fd8ae84661699134906b757d553dddfdf50898
1 // Test this without pch.
2 // RUN: %clang_cc1 -include %S/variables.h -fsyntax-only -verify %s
4 // Test with pch.
5 // RUN: %clang_cc1 -emit-pch -o %t %S/variables.h
6 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
8 int *ip2 = &x;
9 float *fp = &ip; // expected-warning{{incompatible pointer types}}
10 // FIXME:variables.h expected-note{{previous}}
11 double z; // expected-error{{redefinition}}
12 // FIXME:variables.h expected-note{{previous}}
13 int z2 = 18; // expected-error{{redefinition}}
14 double VeryHappy; // expected-error{{redefinition}}
15 // FIXME:variables.h expected-note{{previous definition is here}}
17 int Q = A_MACRO_IN_THE_PCH;
19 int R = FUNCLIKE_MACRO(A_MACRO_, IN_THE_PCH);
22 int UNIQUE(a); // a2
23 int *Arr[] = { &a0, &a1, &a2 };