<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/69434>69434</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] False positive `clang-analyzer-deadcode.DeadStores` warning in a complex expression
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Kirkezz
      </td>
    </tr>
</table>

<pre>
    https://godbolt.org/z/8rT7G13ro
```
#include <array>
#include <iostream>
using namespace std;

int main() {
    int i = 42;
    std::array<int, 14> holes = {0, 4, 20, 12, 32, 16, 57, 17, 80, 20, 100, 24, 116, 32};
    int left = 0, right = holes.size(), middle;
    middle += (middle = (left + right) / 2) % 2;
 while (right - left > 2) {
        if (i < holes[middle]) {
 right = middle;
        } else {
            left = middle;
 }
        middle += (middle = (left + right) / 2) % 2;
    }
 return i - holes[1 + ((i >= holes[right]) ? right : left)];
}
```
"Although the value stored to 'middle' is used in the enclosing expression, the value is never actually read from 'middle' "
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVM2S4jgMfhpxUUE5cv44cICms4c97r6ASQTxrhNTttMz8PRbdtI0zPRxU5SwLenzp8-2lPf6MjLvoDhAcVypKfTW7f7U7l--31cn2912fQhXD3IP1AA1F9udrAkb6y5AzR2oqd3f1R-ZdBbEEcQeSrH85ilJPbZm6hhBvinn1A3k-3c-bX1wrIaHe_J6vOCoBvZX1TL60IE8LKnJ6jHgoPQIVANtEarFi4gYfRpBHjGnR1p0JJg9yP1C5k2PAegNsxzkO_bWsE9pUB1EXM-joTTMKFqZbFZGW1RpnGwtniLFPEnJ2RwrCarjC5XI0fA5pP1SgtOXfp4mIhuv7zxXF72D7jrDLxDzEgIdEmeqPxfm2YxOhxk4iUQN0jwo8EmZH71OOPVMYf1J7H2JftY2cT_H4Kjw28wVisPCrzi-ZnwV9U0B8YPqiGw8_75L_B4K_Zod5XyJ_t_EmDl90ucwuRE1rh-FZgkmHUyS4P1xYlAcZvRFBNk8yt-nSuJRFl_X4LHNb--G9ib0drr0GHrGD2Wm-ASs4w6DRaBqkYMq1B4nzx3qMcXy2BqbHg__vDr2XtsxXp8vHO1x5A92qNowKWNu6Fh1eHZ2eEUGolW3k91WbtWKd1m5rcqsyrfFqt_V57wUp0qIc3nKqBJ0lrQtz12uZFZzVa70jgTJTGS1qCkvik1V1qo6sRJC8UllAnLBg9JmY8zHEFvKSns_8a7c5jJfGXVi41NrImqNGi_roLsbEMVW5XYxaX2aLh5yYbQP_gsm6GBSU3tKK47YqHjJrtbroD8YoRSzX43K3O7s1h2rrrUdb46sur-i2B5KgT-UG6OcekSFrR2uhn8-abuanPm1TerQT6dNawegJtJa_tZXZ__hNgA1qVQP1KRq_wsAAP__rrWP3g">