[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 5 05:01:20 PST 2025
================
@@ -7157,7 +7157,7 @@ def note_precedence_conditional_first : Note<
"place parentheses around the '?:' expression to evaluate it first">;
def warn_consecutive_comparison : Warning<
- "comparisons like 'X<=Y<=Z' don't have their mathematical meaning">,
+ "comparisons like 'X %0 Y %1 Z' don't have their mathematical meaning">,
----------------
AaronBallman wrote:
```suggestion
"chained comparison 'X %0 Y %1 Z' does not behave the same as a mathematical expression">,
```
https://github.com/llvm/llvm-project/pull/129285
More information about the cfe-commits
mailing list