brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 5aaa3a2 Raw
25 lines · cpp
1// RUN: %check_clang_tidy %s cppcoreguidelines-macro-usage %t \2// RUN: -config='{CheckOptions: \3// RUN:  {cppcoreguidelines-macro-usage.CheckCapsOnly: true}}' --4 5#ifndef INCLUDE_GUARD6#define INCLUDE_GUARD7 8#define problematic_constant 09// CHECK-MESSAGES: [[@LINE-1]]:9: warning: macro definition does not define the macro name 'problematic_constant' using all uppercase characters10 11#define problematic_function(x, y) ((a) > (b) ? (a) : (b))12// CHECK-MESSAGES: [[@LINE-1]]:9: warning: macro definition does not define the macro name 'problematic_function' using all uppercase characters13 14#define problematic_variadic(...) (__VA_ARGS__)15// CHECK-MESSAGES: [[@LINE-1]]:9: warning: macro definition does not define the macro name 'problematic_variadic' using all uppercase characters16//17#define problematic_variadic2(x, ...) (__VA_ARGS__)18// CHECK-MESSAGES: [[@LINE-1]]:9: warning: macro definition does not define the macro name 'problematic_variadic2' using all uppercase characters19 20#define OKISH_CONSTANT 4221#define OKISH_FUNCTION(x, y) ((a) > (b) ? (a) : (b))22#define OKISH_VARIADIC(...) (__VA_ARGS__)23 24#endif25