2009-04-12 04:52:19 +08:00
|
|
|
// Test this without pch.
|
2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -include %S/variables.h -fsyntax-only -verify %s
|
2009-04-12 04:52:19 +08:00
|
|
|
|
|
|
|
// Test with pch.
|
2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -emit-pch -o %t %S/variables.h
|
|
|
|
// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
|
2009-04-10 06:27:44 +08:00
|
|
|
|
|
|
|
int *ip2 = &x;
|
|
|
|
float *fp = &ip; // expected-warning{{incompatible pointer types}}
|
2009-04-10 11:52:48 +08:00
|
|
|
// FIXME:variables.h expected-note{{previous}}
|
|
|
|
double z; // expected-error{{redefinition}}
|
2009-04-15 05:18:50 +08:00
|
|
|
// FIXME:variables.h expected-note{{previous}}
|
|
|
|
int z2 = 18; // expected-error{{redefinition}}
|
2009-04-22 08:17:41 +08:00
|
|
|
double VeryHappy; // expected-error{{redefinition}}
|
|
|
|
// FIXME:variables.h expected-note{{previous definition is here}}
|
2009-04-11 06:13:17 +08:00
|
|
|
|
|
|
|
int Q = A_MACRO_IN_THE_PCH;
|
|
|
|
|
2009-04-13 09:29:17 +08:00
|
|
|
int R = FUNCLIKE_MACRO(A_MACRO_, IN_THE_PCH);
|
|
|
|
|
|
|
|
|
|
|
|
int UNIQUE(a); // a2
|
|
|
|
int *Arr[] = { &a0, &a1, &a2 };
|