Daniel Dunbar | 9263fd5 | 2008-10-04 20:46:41 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify -DAS_SOURCE %s && |
| 2 | // RUN: env CPATH="" clang -fsyntax-only -verify -DAS_SOURCE %s && |
| 3 | // RUN: env CPATH="xyz:xyz" clang -fsyntax-only -verify -DAS_SOURCE %s && |
| 4 | // RUN: env CPATH="xyz::xyz" clang -fsyntax-only -verify -DSHOULD_FIND -DAS_SOURCE %s && |
| 5 | // RUN: env CPATH="../Driver" clang -fsyntax-only -verify -DSHOULD_FIND -DAS_SOURCE %s |
Daniel Dunbar | 9263fd5 | 2008-10-04 20:46:41 +0000 | [diff] [blame] | 6 | |
| 7 | #ifdef AS_SOURCE |
| 8 | #undef AS_SOURCE |
| 9 | |
| 10 | #define AS_INCLUDE |
| 11 | |
| 12 | #ifdef SHOULD_FIND |
| 13 | #include <env-include-paths.c> |
| 14 | #else |
| 15 | /* expected-error {{file not found}} */ #include <env-include-paths.c> |
| 16 | #endif |
| 17 | |
| 18 | #undef AS_INCLUDE |
| 19 | |
| 20 | #endif |
| 21 | |
| 22 | #ifdef AS_INCLUDE |
| 23 | |
| 24 | /* expected-warning {{Hello}} */ #warning "Hello" |
| 25 | |
| 26 | #endif |