Issue |
129069
|
Summary |
warn_consecutive_comparision produces confusing message.
|
Labels |
new issue
|
Assignees |
|
Reporter |
earnol
|
The warning for line like:
```if (a >= b <= c) {}```
produces warning or error after https://github.com/llvm/llvm-project/pull/128145 like:
```
warning: comparisons like 'X<=Y<=Z' don't have their mathematical meaning [-Wparentheses]
```
I'm finding this warning/error quite confusing as user's code contains neither X nor Y. Operators also got messed up. I believe the message reported should be corrected.
Also lines like 11:
```
if (a < b == c) {}
```
are not reported either. Which looks like a bug.
Please see live code example: https://godbolt.org/z/TTxrb1WcG
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs