summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/checkers/bugprone-macro-parentheses-cmdline.cpp
blob: 9ff757d13c62e34b9582a0cecc6607110c2250ec (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: %check_clang_tidy %s bugprone-macro-parentheses %t -- -- -DVAL=0+0

// The previous command-line is producing warnings and fixes with the source
// locations from a virtual buffer. VAL is replaced by '0+0'.
// Fixes could not be applied and should not be reported.
int foo() { return VAL; }

#define V 0+0
int bar() { return V; }
// CHECK-FIXES: #define V (0+0)
OpenPOWER on IntegriCloud