<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/129069>129069</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
warn_consecutive_comparision produces confusing message.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
earnol
</td>
</tr>
</table>
<pre>
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
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUU8GOpDYQ_ZriUlpkDDTdBw7MdjraU3IYaXZzWRV20ThrbGKbnkm-PoLu6VYmuQQhGclFvVf13qMYzdkxt1A_QX3MaEmjDy1TcN5mvdd_ts8j4ysFZ9wZBx_QGsdozQ-GsgPRwU5cXzMgyD0hlD9BecQeofy8fiiQB4TmCZrjvRZENwevF8Xx3tsH5BB8QBoSBxxTmuMKIU8gT2eTxqXPlZ9Anqy9vB-f5uB_Z5VAnubFWpCnQu6Lqv4vgiC6dzAoO1R-mimY6F3cqhFk8_XK-dv1-A1kg9o7kE3CkS6MaWQTcKI08kTJKLI4MW30oX769DJTYJdGjhyhPn4A_wKymXAwTq_1aTT32UGerqP_sZjEqLwblrgWUcQlcgDZRFReb1eJjIvo2KSRA35F5wN-y_GXmQMlHyKSjR7PPuHEMbLGZc7xC_ZsDV9H2C7ozBh49iGxxjj6xWrsV4AQWCXWOYiuWzutet82VBT_XulD9s-b5se75ttzE_6f_1BgdD498K_D5PgyGjWi9f7HDZGwX84rFRDdr5YpMkZe7Xfh60L4jabZrlJ_dIzXvbcp92Fd718gT8_Pb6EvXtTPILpMt6U-lAfKuC2aSuyaQux32dgqyT01YtD1oSoU75Xmeui51PogqK4pM60UshZSNkVdVdUuHwatmoIkDVLvq5qgEjyRsfnqzxU-MzEu3BbyIHaHzFLPNm55k9LxK263IOUav9Bupu6Xc4RKWBNTfLRJJlluV8t8V95FVksyF_7-7mPjHd5D9bDQTes8W4Jt_3eoNnJxi9XG_tLKvwMAAP__me5V2g">