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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] readability-redundant-preprocessor false positive on builtin preprocessor checks
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy,
            false-positive
      </td>
    </tr>

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

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

<pre>
    ```c++
#if __has_builtin(__remove_cvref)
#  if __has_cpp_attribute(no_unique_address)
# endif
#endif
```
([Godbolt](https://godbolt.org/z/sEs3P3Yz6)) generates
```c++
1 warning generated.
<source>:2:4: warning: nested redundant #if; consider removing it [readability-redundant-preprocessor]
 2 | #  if __has_cpp_attribute(no_unique_address)
      | ^
<source>:1:2: note: previous #if was here
    1 | #if __has_builtin(__remove_cvref)
      |  ^
1 warning generated.
```
which is obviously wrong.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycU02PmzwQ_jXDxUpExnweOCSb5b2-156QMRNw17GpbRJlf30Fm4_NqmqrIkvG-PHzMYyF96o3RBWkO0j3kZjCYF01Dkob9ZbnedTa7lJBFn8MCbibR7yHeAvI1YE1zSB8005KB2UAi6ZxdLQnauTJ0QGwvIMZu8PlODYiBKfaKRBgYWwzGfVjokZ0nSPvn86R6dThvvy8uvm6bRaQ7v6zXWt1gHQPWAwhjB74FrAGrPuPrbV1PWD9Dlj7V8__59_es1kQS9aTIScC-S8CT8E37CycUaa_w7v1Fc9fvJ2cJOCvwLcIfJsA397w86shH6hjjrrJdMIEtpQR-I5Ja7zqyLGlgDO9CgzSnSPRiVZpFS6r-7HV6Gh0VpL31s1ZF32GDPIX9q_FZsuzMKSvv0y0uaZixgaa59HRSdnJf8RgZ-HZQI4efJubo7_vlYeNh4_f1Py5Cc6DkgNTntl2MaYv7Oys6ddRV_Gu5KWIqNpkJSZZXGAeDVWbpGUpyxQxzw95gRueFKXkhYhlkpQ8jlSFMfK42JSbLI6Rr3PKRYKS2izOM5kQJDEdhdJrrU_Hubsi5f1EVZYUmEZatKT9csUQpRamXwXVXQAR8AUQD0J7Wo3Wq6BONH9O95GrZq5VO_UeklgrH_yDPaiglzv7iS3dsz83Clu02E2LWcOuf4M9weRA8s1Hk9PVlxukwjC1a2mPgPXs5zqtRme_kwyA9RLdA9ZL-p8BAAD__zUYWoE">