blob: de4ba5b1b7e753d16905533f0d83fe44a0d638c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  | 
// RUN: clang -fsyntax-only -verify -DAS_SOURCE %s &&
// RUN: env CPATH="" clang -fsyntax-only -verify -DAS_SOURCE %s &&
// RUN: env CPATH="xyz:xyz" clang -fsyntax-only -verify -DAS_SOURCE %s &&
// RUN: env CPATH="xyz::xyz" clang -fsyntax-only -verify -DSHOULD_FIND -DAS_SOURCE %s &&
// RUN: env CPATH="../Driver" clang -fsyntax-only -verify -DSHOULD_FIND -DAS_SOURCE %s
// XFAIL
#ifdef AS_SOURCE
#undef AS_SOURCE
#define AS_INCLUDE
#ifdef SHOULD_FIND
#include <env-include-paths.c>
#else
/* expected-error {{file not found}} */ #include <env-include-paths.c> 
#endif
#undef AS_INCLUDE
#endif
#ifdef AS_INCLUDE
/* expected-warning {{Hello}} */ #warning "Hello"
#endif
  |