Chris Lattner | 285d03f | 2009-04-11 20:52:19 +0000 | [diff] [blame^] | 1 | // 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 Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 5 | // 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 Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 7 | |
| 8 | int *ip2 = &x; |
| 9 | float *fp = &ip; // expected-warning{{incompatible pointer types}} |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 10 | // FIXME:variables.h expected-note{{previous}} |
| 11 | double z; // expected-error{{redefinition}} |
| 12 | |
| 13 | //double VeryHappy; // FIXME: xpected-error{{redefinition}} |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 14 | |
Chris Lattner | 531cc83 | 2009-04-10 22:13:17 +0000 | [diff] [blame] | 15 | |
| 16 | int Q = A_MACRO_IN_THE_PCH; |
| 17 | |