blob: 91ca48070c66ae089696e9585178f82068ce5007 [file] [log] [blame]
Daniel Dunbar9263fd52008-10-04 20:46:41 +00001// 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 Dunbar9263fd52008-10-04 20:46:41 +00006
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