xref: /llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/macro-parentheses-cmdline.cpp (revision 89a1d03e2b379e325daa5249411e414bbd995b5e)
1*89a1d03eSRichard // RUN: %check_clang_tidy %s bugprone-macro-parentheses %t -- -- -DVAL=0+0
2*89a1d03eSRichard 
3*89a1d03eSRichard // The previous command-line is producing warnings and fixes with the source
4*89a1d03eSRichard // locations from a virtual buffer. VAL is replaced by '0+0'.
5*89a1d03eSRichard // Fixes could not be applied and should not be reported.
foo()6*89a1d03eSRichard int foo() { return VAL; }
7*89a1d03eSRichard 
8*89a1d03eSRichard #define V 0+0
bar()9*89a1d03eSRichard int bar() { return V; }
10*89a1d03eSRichard // CHECK-FIXES: #define V (0+0)
11