28 lines · c
1// RUN: %clang_cc1 -Eonly -verify %s2 3#if 04#if 15#endif junk // shouldn't produce diagnostics6#endif7 8#if 09#endif junk // expected-warning{{extra tokens at end of #endif directive}}10 11#if 1 junk // expected-error{{token is not a valid binary operator in a preprocessor subexpression}}12#X // shouldn't produce diagnostics (block #if condition not valid, so skipped)13#else14#X // expected-error{{invalid preprocessing directive}}15#endif16 17#if 018// diagnostics should not be produced until final #endif19#X20#include21#if 1 junk22#else junk23#endif junk24#line -225#error26#warning27#endif junk // expected-warning{{extra tokens at end of #endif directive}}28