blob: f725e7d8f05c37d43c60cb8ea745d5b6de26840b [file] [log] [blame]
Chris Lattner285d03f2009-04-11 20:52:19 +00001// Test this without pch.
2// RUN: clang-cc -triple=i686-apple-darwin9 -include %S/variables.h -fsyntax-only -verify %s &&
3
4// Test with pch.
Douglas Gregor8038d512009-04-10 17:25:41 +00005// RUN: clang-cc -emit-pch -triple=i686-apple-darwin9 -o %t %S/variables.h &&
6// RUN: clang-cc -triple=i686-apple-darwin9 -include-pch %t -fsyntax-only -verify %s
Douglas Gregor2cf26342009-04-09 22:27:44 +00007
8int *ip2 = &x;
9float *fp = &ip; // expected-warning{{incompatible pointer types}}
Douglas Gregor14f79002009-04-10 03:52:48 +000010// FIXME:variables.h expected-note{{previous}}
11double z; // expected-error{{redefinition}}
12
13//double VeryHappy; // FIXME: xpected-error{{redefinition}}
Douglas Gregor2cf26342009-04-09 22:27:44 +000014
Chris Lattner531cc832009-04-10 22:13:17 +000015
16int Q = A_MACRO_IN_THE_PCH;
17
Chris Lattnerc1f9d822009-04-13 01:29:17 +000018int R = FUNCLIKE_MACRO(A_MACRO_, IN_THE_PCH);
19
20
21int UNIQUE(a); // a2
22int *Arr[] = { &a0, &a1, &a2 };