================ @@ -0,0 +1,230 @@ +// RUN: %check_clang_tidy %s readability-use-std-min-max %t +#define MY_MACRO_MIN(a, b) ((a) < (b) ? (a) : (b)) + +constexpr int myConstexprMin(int a, int b) { + return a < b ? a : b; +} + +constexpr int myConstexprMax(int a, int b) { + return a > b ? a : b; +} + +#define MY_IF_MACRO(condition, statement) \ + if (condition) { \ + statement \ + } + +class MyClass { +public: + int member1; + int member2; +}; + +template<typename T> + +void foo(T value7) { + int value1,value2,value3; + short value4; + unsigned int value5; + unsigned char value6; + const int value8 = 5; + volatile int value9 = 6; + MyClass obj; + ---------------- PiotrZSL wrote:
This isn't C, put variables closer to usage... https://github.com/llvm/llvm-project/pull/77816 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits