-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[clang-tidy] unexpected readability-math-missing-parentheses
warnings for assignment
#92516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Reduced: void f(int i) {
int j, k;
for (j = i + 1, k = 0; j < 1; ++j) {}
} |
Agree, check shouldn't warn for assignments, only for math operators. |
Not sure why, but following code has no warnings: void f(int i) {
int j;
for (j = i + 1; j < 1; ++j) {}
} |
It seems somewhat related to the comma, following code has the warning too: void f(int i) {
int j;
for (j = i + 1, 2; j < 1; ++j) {}
} |
PiotrZSL
added a commit
to PiotrZSL/llvm-project
that referenced
this issue
Jun 6, 2024
…rentheses Do not emit warnings for non-math operators. Closes llvm#92516
PiotrZSL
added a commit
to PiotrZSL/llvm-project
that referenced
this issue
Jun 8, 2024
…rentheses Do not emit warnings for non-math operators. Closes llvm#92516
nekoshirro
pushed a commit
to nekoshirro/Alchemist-LLVM
that referenced
this issue
Jun 9, 2024
…rentheses (llvm#94654) Do not emit warnings for non-math operators. Closes llvm#92516 Signed-off-by: Hafidz Muzakky <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see https://godbolt.org/z/7nK7fG4Gs, reduced from https://github.com/zufuliu/notepad2/blob/main/scintilla/src/Document.cxx#L691
The text was updated successfully, but these errors were encountered: