[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri May 17 04:24:08 PDT 2024


================
@@ -487,6 +487,9 @@ Improvements to Clang's diagnostics
        }
      };
 
+- Clang emits a ``-Wparentheses`` warning for expressions with consecutive comparisons like ``x < y < z``.
+  It was made a ``-Wparentheses`` warning to be consistent with gcc.
----------------
AaronBallman wrote:

```suggestion
- Clang emits a ``-Wparentheses`` warning for expressions with consecutive comparisons like ``x < y < z``.
  Fixes #GH20456.
```

https://github.com/llvm/llvm-project/pull/92200


More information about the cfe-commits mailing list