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

    <tr>
        <th>Summary</th>
        <td>
            [clang] crashes when a concept is specialised as a class template
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            c++20,
            clang:frontend,
            concepts
      </td>
    </tr>

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

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

<pre>
    **Problem**
The following program crashes Clang and can be replicated using `clang++ -std=c++20`.
```cpp
template<class T>
concept C = true;

template<class T>
class C<int> {};
```
**Clang version**
Confirmed on a4c8fb9d1f46f30c66a9ca0dd07c7933f338bb34.
**Expected behaviour**
Print an error message similar to the following.
```
/tmp/error.cpp:4:1: error: we attempted to specialise 'C' as a class template, but 'C' is a concept
class C<int>
      ^~~~~~
/tmp/error.cpp:1:1: note: first declared here
concept C = true;
        ^~~~~~~~
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFU8tyrCAQ_RrcdMVS8DEuXMw4yTqL_AACjqRQLMAk9-9vo5nM3FtJxWoUuvH06UPTW_mnJfSI9uxsb9S0L0h2JtnxZVQwWGPsu54vsDh7cXwC4bgflYfOcPTyWYLgM_QKnFqMFjwoCauPf5AqE3EToSc0ePBBEnYW-5JmGE73RDjbTSzL7glqWgxCEdYhhPfwQtjjHhJ2FmoJ0AGCQXArbjp94vz677buMKLngF4g9YnU5xvAlcjnchNjL_RNOa_tfK9PZ-dBuwnrtTPwQhyGvpH5UFQDy0RV8UbwTMqsFnXD2MDYoe9Zkd5DP34sSkTBejXyN21Xd4__7JAlKgzKOetgUt7ziwKvJ224g2Ah3J_Q_2JeEz2FacH3BpJGhdmxwJHj2JHj5F0BD1G5yAaRPRLT3GivgNC6wwHcA4ddwS-JaQf9Gr626G3LfkDfK757YXtI-Ujqf-1nyvmV8mzj0R4BpfcBpMIMDjmPyqlfGwTgx8z3-a8KJqrNqyqvGctZnsiWyYY1PAk6GNWS8rR3d3n-uhPvo5pvCkQ5bjrK7wRMVmfaMYTFY0lYMdpFh3HtU2HxLj4Z83b9POAFfMVuwaX2flUeJ2Vd5GUytmIoaC4EdtzAeM0ptlyOId6UNctq2SSG98r4yJlQeruBlMYTjK6tEnYcnJ2DmuVdZK_FR095TnRLM0qzA22yjOE3ZTLvqz4_DPkwcHYQpMjUxLVJI-fUukvi2o1-v148BlGK4G9BFENfZrXJGfH5GkbrWvEq-2Qrs91q_AuTKmEE">