1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -Eonly -verify -Wno-all -Wmacro-redefined -DCLI_MACRO=1 -DWMACRO_REDEFINED 2*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -Eonly -verify -Wno-all -Wno-macro-redefined -DCLI_MACRO=1 3*0a6a1f1dSLionel Sambuc 4*0a6a1f1dSLionel Sambuc #ifndef WMACRO_REDEFINED 5*0a6a1f1dSLionel Sambuc // expected-no-diagnostics 6*0a6a1f1dSLionel Sambuc #endif 7*0a6a1f1dSLionel Sambuc 8*0a6a1f1dSLionel Sambuc #ifdef WMACRO_REDEFINED 9*0a6a1f1dSLionel Sambuc // expected-note@1 {{previous definition is here}} 10*0a6a1f1dSLionel Sambuc // expected-warning@+2 {{macro redefined}} 11*0a6a1f1dSLionel Sambuc #endif 12*0a6a1f1dSLionel Sambuc #define CLI_MACRO 13*0a6a1f1dSLionel Sambuc 14*0a6a1f1dSLionel Sambuc #ifdef WMACRO_REDEFINED 15*0a6a1f1dSLionel Sambuc // expected-note@+3 {{previous definition is here}} 16*0a6a1f1dSLionel Sambuc // expected-warning@+3 {{macro redefined}} 17*0a6a1f1dSLionel Sambuc #endif 18*0a6a1f1dSLionel Sambuc #define REGULAR_MACRO 19*0a6a1f1dSLionel Sambuc #define REGULAR_MACRO 1 20