You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clang-tools-extra/test/clang-tidy/checkers/readability/math-missing-parentheses.cpp
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -157,3 +157,17 @@ namespace PR92516 {
157
157
for (j = i + 1, 2; j < 1; ++j) {}
158
158
}
159
159
}
160
+
161
+
namespacePR141249 {
162
+
voidAssignAsParentBinOp(int* netChange, int* nums, int k, int i) {
163
+
//CHECK-MESSAGES: :[[@LINE+1]]:30: warning: '-' has higher precedence than '^'; add parentheses to explicitly specify the order of operations [readability-math-missing-parentheses]
164
+
netChange[i] = nums[i] ^ k - nums[i];
165
+
}
166
+
}
167
+
168
+
voidCompareAsParentBinOp(int b) {
169
+
//CHECK-MESSAGES: :[[@LINE+1]]:12: warning: '*' has higher precedence than '-'; add parentheses to explicitly specify the order of operations [readability-math-missing-parentheses]
0 commit comments