================
@@ -7138,6 +7138,13 @@ def warn_consecutive_comparison : Warning<
   "chained comparison 'X %0 Y %1 Z' does not behave the same as a mathematical 
expression">,
   InGroup<Parentheses>, DefaultError;
 
+def warn_comparison_in_fold_expression
+    : Warning<
+          "comparison in a fold expression would evaluate to '(X %0 Y) %0 Z' "
+          "which does not behave the same as a mathematical expression">,
+      InGroup<Parentheses>,
+      DefaultError;
----------------
AaronBallman wrote:

```suggestion
def warn_comparison_in_fold_expression : Warning<
  "comparison in fold expression would evaluate to '(X %0 Y) %0 Z' "
  "which does not behave the same as a mathematical expression">,
  InGroup<Parentheses>, DefaultError;
```

https://github.com/llvm/llvm-project/pull/136836
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to