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

    <tr>
        <th>Summary</th>
        <td>
            Backport 26068c6e6032 to release/15.x
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    This fixes an issue when compiling libc++ with gcc, as described in https://reviews.llvm.org/D13546:

> [libc++] <type_traits>: Avoid instantiating a pointer type.

> GCC expands the pointer type in this conditional expression even for template types _Up that are not arrays.  This raises an error when std::decay<> is used with reference types (as is done in LLVM's sources).  Using add_pointer<> causes GCC to only instantiate a pointer type for array types.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdUsuS2yAQ_BrpMhWXhB62Djr4sZvL5pbN1YVgbJFgUAHy4-8zYO-zihIg9cx0t3qw8tb_HpWHg7qiB25AeT8jXEY0IOxpUlqZI2g1iIxtaMFFhRGOgq5b4B4keuHUgBKUgTGEyWfVOmPPtByeFV78QuvzaWHdkV7tyqqp24godlnx9qyeIGs2HzOyZgdZtQ23CffBcRWo5xMVwfpsVRzkAzdB8RCpcZisMgEdRPziU8v308_tFvA6cSM9hBG_FETaIRogrJEqKGu4jmCH3tMF8ExGHCyB8TRpHjBVedi_TlTHA3CHYGzcHb_5BUCyk1j7u5_oHFUnP32QUXq1lij4jRRGcgSePdmXfHV4QIdGvE3J2Io8Joi0JlF9efnzK2NLD97OTqDPWEcjX31yQsr9Q9qjt-BzZBH1BwvW6Nsn8_CbdUllUnEf_rAyx75s266sWds0uewr2VUdz4MKGvsNF_8m6wKwtmhXosW2qFic5VAj90i_vGwW13x2uv8ajiPJnYcFRYwuMSGP7cfk7F8Uga4piaTwuenKapWP_bBkJWN1Kdu2bTgvZdPw6sAKJpgoDl2Taz6g9j2FKWPM4OUeZjpTonLVE5KV1KFc1TXROvBluywHhl1R1nVdZXWBJ670e2Bz1ydKw3z09FErHz7SnHMKyNEgpnHUn89htK7fqZMK7rY20imRJwJ9EvAfA84c0A">