[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Preprocessor / macro_redefined.c
blobf7d3d6db002f6a8559f7eafbb1b90fd1c9f8e7c9
1 // RUN: %clang_cc1 %s -Eonly -verify -Wno-all -Wmacro-redefined -DCLI_MACRO=1 -DWMACRO_REDEFINED
2 // RUN: %clang_cc1 %s -Eonly -verify -Wno-all -Wno-macro-redefined -DCLI_MACRO=1
4 #ifndef WMACRO_REDEFINED
5 // expected-no-diagnostics
6 #endif
8 #ifdef WMACRO_REDEFINED
9 // expected-note@1 {{previous definition is here}}
10 // expected-warning@+2 {{macro redefined}}
11 #endif
12 #define CLI_MACRO
14 #ifdef WMACRO_REDEFINED
15 // expected-note@+3 {{previous definition is here}}
16 // expected-warning@+3 {{macro redefined}}
17 #endif
18 #define REGULAR_MACRO
19 #define REGULAR_MACRO 1