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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] false positive for misc-redundant-expression with fold-expression
        </td>
    </tr>

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

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

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

<pre>
    In some cases, clang-tidy reports a false-positive misc-redundant-expression for fold expressions that contain the same value more than once (https://godbolt.org/z/YfThnE9Wh):
```
#include <type_traits>

template<typename... Args>
constexpr bool all_true = (... && Args::value);
constexpr bool result = all_true<std::true_type, std::true_type, std::true_type>;
```

Output:
```
<source>:4:28: warning: both sides of operator are equivalent [misc-redundant-expression]
    4 | constexpr bool all_true = (... && Args::value);
      | 
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk0GPmzwQhn-NuYwSEZsQOHBgk430nb5LpaqnlYEB3BqbeoZst7--Mkk3q1VX6qFRZPDondczgx9NZAaHWIn9g9ifEr3w6ENF7YjuG4ak8d1L9Z8D8hNCqwlJyCO0Vrthw6Z7gYCzD0ygodeWcDN7MmwuCJOhdhOwW1ynHW_wxxyQyHgHvQ_Qe9vBPUbAo2ZovWNtHPCIQHpCuGi7IEw-YBQ48K5FELIYmWcSqhbyLOR58F3jLW99GIQ8_xTy_KX_NLrH8vMoZBll6UmktcjT2_-6lcq41i4dglBHfpnxiYM2TEI93hTryjjNVjPeRE5PuN1uoQ7DXdl6RxzbgcZ7C9raJw5LND7FcqNeyFzI_JZWC1Wvva31PfzRJCAtlleL335CHYm7a3rcP8WC4gf566h6fD3u_TjW9f-F54U_HJk6kl9Ce_WpM6FqWQhVw7MOzrghvjaeRyDTIYHvwc8YNPsAOiDg98VctEXHIPYPH14QsT9djwMAyEAcjvBP5gvrL9q9ay7pKtWVqtQJVruDPChVpmWRjJXcHfqs2Keo-ga1bKTEvMt1rtuiVE3fJaaSqczSUuZpIbN9scVs10idp2XaYNv1uchSnLSxW2svU7ygiSFasNrt0rQoE6sbtLTCJ-WdKiFlhDFUMWvTLAOJLLWGmO4-bNiu2L5J25-uFMIrhZG1j0l8NjyuKL4JJkuw1Tu-DI9Ls239JOQ5FnB7bObgv2LLQp7XrkjI862xSyV_BQAA___wFl5X">