__has_include_next("stdint.h")// expected-warning {{#include_next in primary source file}} expected-error {{__has_include_next must be used within a preprocessing directive}}
__has_include("stdint.h")// expected-error {{__has_include must be used within a preprocessing directive}}
}
MACRO1// expected-error {{__has_include must be used within a preprocessing directive}}
#if 1
MACRO1// expected-error {{__has_include must be used within a preprocessing directive}}
#endif
#if 0
#elif 1
MACRO1// expected-error {{__has_include must be used within a preprocessing directive}}
#endif
#if 0
MACRO1// This should be fine because it is never actually reached
// expected-error@+1 {{expected "FILENAME" or <FILENAME>}} expected-warning@+1 {{missing terminating '"' character}} expected-error@+1 {{invalid token at start of a preprocessor expression}}
// expected-error@+1 {{expected "FILENAME" or <FILENAME>}} expected-warning@+1 {{missing terminating '"' character}} expected-error@+1 {{token is not a valid binary operator in a preprocessor subexpression}}
#if __has_include(stdint.h")
#endif
// expected-error@+1 {{expected "FILENAME" or <FILENAME>}} expected-error@+1 {{token is not a valid binary operator in a preprocessor subexpression}}
// expected-error@+1 {{missing ')' after '__has_include'}} // expected-error@+1 {{expected value in expression}} // expected-note@+1 {{to match this '('}}
// expected-error@+1 {{missing '(' after '__has_include'}} // expected-error@+1 {{expected value in expression}}
#if __has_include
#endif
// expected-error@+1 {{missing ')' after '__has_include'}} // expected-error@+1 {{expected value in expression}} // expected-note@+1 {{to match this '('}}
#if __has_include(<stdint.h>
#endif
// expected-error@+1 {{expected "FILENAME" or <FILENAME>}} // expected-error@+1 {{expected value in expression}}