1 // RUN: %clang_cc1 %s -E -CC -verify
2 // RUN: %clang_cc1 %s -E -CC -DPEDANTIC -pedantic -verify
10 #if B // expected-warning{{macro expansion producing 'defined' has undefined behavior}}
14 #define TEST(a) (defined(m_##a) && a)
17 // expected-warning@+4{{macro expansion producing 'defined' has undefined behavior}}
20 // This shouldn't warn by default, only with pedantic:
25 // Only one diagnostic for this case:
26 #define INVALID defined(
27 #if INVALID // expected-error{{macro name missing}}