Add a test to make sure __has_include works from inside a macro.

llvm-svn: 176152
This commit is contained in:
Argyrios Kyrtzidis 2013-02-27 01:34:48 +00:00
parent 68a5750d5d
commit f77453cf22
1 changed files with 6 additions and 0 deletions

View File

@ -170,3 +170,9 @@ __has_include
// expected-error@+1 {{expected "FILENAME" or <FILENAME>}} // expected-error@+1 {{expected value in expression}}
#if __has_include(<stdint.h)
#endif
#define HAS_INCLUDE(header) __has_include(header)
#if HAS_INCLUDE(<stdint.h>)
#else
#error "__has_include failed (9)."
#endif