blob: ced24311c0099d370d3ff85fd2a8356dea5c1d77 [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 &&
Daniel Dunbaref96cf02008-10-04 21:05:04 +00004// RUN: cd $(dirname %s) &&
Daniel Dunbar9263fd52008-10-04 20:46:41 +00005// RUN: env CPATH="xyz::xyz" clang -fsyntax-only -verify -DSHOULD_FIND -DAS_SOURCE %s &&
6// RUN: env CPATH="../Driver" clang -fsyntax-only -verify -DSHOULD_FIND -DAS_SOURCE %s
Daniel Dunbar9263fd52008-10-04 20:46:41 +00007
8#ifdef AS_SOURCE
9#undef AS_SOURCE
10
11#define AS_INCLUDE
12
13#ifdef SHOULD_FIND
14#include <env-include-paths.c>
15#else
16/* expected-error {{file not found}} */ #include <env-include-paths.c>
17#endif
18
19#undef AS_INCLUDE
20
21#endif
22
23#ifdef AS_INCLUDE
24
25/* expected-warning {{Hello}} */ #warning "Hello"
26
27#endif