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

    <tr>
        <th>Summary</th>
        <td>
            clang frontend crashes on LLVM-18
        </td>
    </tr>

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

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

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

<pre>
    Example code:

```c++
#include <type_traits>

class X {};


template <typename T>
concept XPtr = std::is_base_of_v<std::remove_pointer_t<X>, std::remove_pointer_t<T>>;

template <XPtr T>
class Y {
public:
    Y(T y)  {  }

    template <XPtr U>
    friend class Y;
};

template class Y<X*>;

int main() {
    Y y((X*) nullptr);
}
```

Online demo: https://godbolt.org/z/PcboKh3eP
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8k81upDoQhZ-m2FhpmTK_Cxb9EzY3VzeL3FFn1TJQ3TgyNsImmp6nH5lkSGeiGckyUnF8zlcFls6piyGqIN1Beojk7Hs7Vdf5RZm2J3PhRdTY7lrdf5fDqIm1tiMQW-AH4L_2jL-tFnAX1lsVhTKtnjtiIPb-OtLJT1J5B-L-9nSrpXPsyCDfQX4AsftkveyehlFLvxoZORB7Wn1aa1oaPTs--omBODDnu4AotsqdGunoZM-nVxD7tT7RYF_pNFplPE0nD2J_DHa4Z3_TLJFh7f5EtyDckC29PS-9LYVxbrRq1_kxxtgzYPHEroAlC7qwHW7tg-ZLxP9rRHh9nhSZjr2nfeB9Gefqs0r3R8Dt156U8WyQygAWAWzlX4ADbAFYLEexZGbWevQTYPkp-vO_cev-n9HKEOtosCC2rPd-dGEmWAPWF9s1VvuNnS6A9Q_A-rFt7D-9oMeoq0RXilJGVMV5HKdxgWUW9ZXIeRZnuZAkcs4bOnPOz53syizpRIpppCrkmHCBOU-TJM02aRNTmzRcSC6aMk4h4TRIpTdavw4hO1LOzVQVWZ6VkZYNabfcEcRWS3MBxHBdpiro75r54iDhWjnvPhy88pqqRc7OkzV--UiTdD05Zg17ePj2711cRPOkq99moHw_N5vWDoB18Ht_3I2TfaHWA9YLngOsF8KfAQAA___KkBV7">