189a1d03eSRichard // RUN: %check_clang_tidy %s cppcoreguidelines-macro-usage %t \
289a1d03eSRichard // RUN: -config='{CheckOptions: \
3*e8a3ddafSNathan James // RUN:  {cppcoreguidelines-macro-usage.CheckCapsOnly: true}}' --
489a1d03eSRichard 
589a1d03eSRichard #ifndef INCLUDE_GUARD
689a1d03eSRichard #define INCLUDE_GUARD
789a1d03eSRichard 
889a1d03eSRichard #define problematic_constant 0
989a1d03eSRichard // CHECK-MESSAGES: [[@LINE-1]]:9: warning: macro definition does not define the macro name 'problematic_constant' using all uppercase characters
1089a1d03eSRichard 
1189a1d03eSRichard #define problematic_function(x, y) ((a) > (b) ? (a) : (b))
1289a1d03eSRichard // CHECK-MESSAGES: [[@LINE-1]]:9: warning: macro definition does not define the macro name 'problematic_function' using all uppercase characters
1389a1d03eSRichard 
1489a1d03eSRichard #define problematic_variadic(...) (__VA_ARGS__)
1589a1d03eSRichard // CHECK-MESSAGES: [[@LINE-1]]:9: warning: macro definition does not define the macro name 'problematic_variadic' using all uppercase characters
1689a1d03eSRichard //
1789a1d03eSRichard #define problematic_variadic2(x, ...) (__VA_ARGS__)
1889a1d03eSRichard // CHECK-MESSAGES: [[@LINE-1]]:9: warning: macro definition does not define the macro name 'problematic_variadic2' using all uppercase characters
1989a1d03eSRichard 
2089a1d03eSRichard #define OKISH_CONSTANT 42
2189a1d03eSRichard #define OKISH_FUNCTION(x, y) ((a) > (b) ? (a) : (b))
2289a1d03eSRichard #define OKISH_VARIADIC(...) (__VA_ARGS__)
2389a1d03eSRichard 
2489a1d03eSRichard #endif
25