File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -11,23 +11,27 @@ void ok_eq(int a) {
1111void swap_eq (int a) {
1212 if (0 == a) {} // CHECK-MESSAGES: warning: constant operand should be on the Right side
1313 // CHECK-FIXES: if (a == 0) {} //
14+ // CHECK-LEFT-MESSAGES-NOT: readability-constant-operand-order
1415}
1516
1617void swap_asym (int a) {
1718 if (0 < a) {} // CHECK-MESSAGES: warning:
1819 // CHECK-FIXES: if (a > 0) {} //
20+ // CHECK-LEFT-MESSAGES-NOT: readability-constant-operand-order
1921}
2022
2123void null_ptr (int *p) {
2224 if (nullptr == p) {} // CHECK-MESSAGES: warning:
2325 // CHECK-FIXES: if (p == nullptr) {} //
26+ // CHECK-LEFT-MESSAGES-NOT: readability-constant-operand-order
2427}
2528
2629// No-fix when side effects:
2730int g ();
2831void side_effects (int a) {
2932 if (0 == g ()) {} // CHECK-MESSAGES: warning:
3033 // CHECK-FIXES-NOT: if (g() == 0)
34+ // CHECK-LEFT-MESSAGES-NOT: readability-constant-operand-order
3135}
3236
3337// Config variant: allow Left and only ==,!=
You can’t perform that action at this time.
0 commit comments