forked from OSchip/llvm-project
Add a test to make sure __has_include works from inside a macro.
llvm-svn: 176152
This commit is contained in:
parent
68a5750d5d
commit
f77453cf22
|
@ -170,3 +170,9 @@ __has_include
|
||||||
// expected-error@+1 {{expected "FILENAME" or <FILENAME>}} // expected-error@+1 {{expected value in expression}}
|
// expected-error@+1 {{expected "FILENAME" or <FILENAME>}} // expected-error@+1 {{expected value in expression}}
|
||||||
#if __has_include(<stdint.h)
|
#if __has_include(<stdint.h)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define HAS_INCLUDE(header) __has_include(header)
|
||||||
|
#if HAS_INCLUDE(<stdint.h>)
|
||||||
|
#else
|
||||||
|
#error "__has_include failed (9)."
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue