1 // RUN: %clang_cc1 %s -Eonly -verify
3 // This should not be rejected.
7 // expected-warning@-2 {{use of a '#elifdef' directive is a C2x extension}}
13 // This should not produce a redefinition warning.
14 #define FUNC_LIKE(a) (a)
15 #define FUNC_LIKE(a)(a)
18 #define FUNC_LIKE2(a)\
20 #define FUNC_LIKE2(a) (a)
23 #define FUNC_LIKE3(a) ( a) // expected-note {{previous definition is here}}
24 #define FUNC_LIKE3(a) (a) // expected-warning {{'FUNC_LIKE3' macro redefined}}
26 // RUN: %clang_cc1 -fms-extensions -DMS_EXT %s -Eonly -verify
28 // This should under C99.
29 #define FUNC_LIKE4(a,b) (a+b) // expected-note {{previous definition is here}}
30 #define FUNC_LIKE4(x,y) (x+y) // expected-warning {{'FUNC_LIKE4' macro redefined}}
32 // This shouldn't under MS extensions.
33 #define FUNC_LIKE4(a,b) (a+b)
34 #define FUNC_LIKE4(x,y) (x+y)
37 #define FUNC_LIKE5(a,b) (a+b) // expected-note {{previous definition is here}}
38 #define FUNC_LIKE5(x,y) (y+x) // expected-warning {{'FUNC_LIKE5' macro redefined}}