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

    <tr>
        <th>Summary</th>
        <td>
            deduction guide does not work with type alias
        </td>
    </tr>

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

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

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

<pre>
    https://godbolt.org/z/zWqYbrrsv
```cpp
template<class T, int N> 
struct S { S(auto); };

template<class T>
using alias_for_S = S<T, 0>;

template<class T>
S(T) -> alias_for_S<T>;
```
Clang rejects the above with:
```cpp
<source>:9:9: error: deduced type 'alias_for_S<T>' (aka 'S<T, 0>') of deduction guide is not written as a specialization of template 'S'
    9 | S(T) -> alias_for_S<T>;
      | ^~~~~~~~~~~~~~
```
However, alias_for_S is just S, so the error message is a bit confusing. The above code should work, although I'm not 100% sure.

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMk89u4zgMxp-GvhANFCmO4oMPTtpg97KXFFjsqZBtxlajWFn9SdAe5tkHUtJOp1NgRrBgA5J__PiRVN7rYSKqoVxDeV-oGEbr6pEu2phD0dr-pR5DOHkQDfAt8O1g-9aaMLNuAL59Tfvf__9rnfNnYA0s2fXpTidgTaDjyahAIDadUd7jI_AN6ingPyAeEFjjg4tdwB2CXOMO-ErFYIFXINYI8h7EOlG_JIkHYE30ehpQGa380966px2CuMcdiE0OxdKt3zFS2EfgFd4lUR9YmfIOeEsNWLMxahrQ0TN1wWMYCVVrz4QXHcbk1C9GgNh4G11HGddUt43knHXpo6c-dtRjeDkRApdfqOASkz8Hlc5_zpDLJN_ur5ig7YRD1D2h9jjZgBenQ6AJlUeF_kSdVka_qnzR7vHNmCuYS2ANImKFIDf4Z-5gXuk-lA_fPq5P1v1lL3Qml6R_rJr2-Bx9SNE26G32NJuDR_JeDTkVha0O2Nlpn8s-w8d35zvbE_rRRtPjxbrDlR9GG4cR_wYuj9mIOWPAS_TR0QxYU_S16CtRqYLquVxwuZBVuSrGWu6rlZIkK1FVi2Uv923XsWVJfVlypfqy0DVnvGSCi_lSVGw161ZiyWUvF5UkRssKFoyOSpuZMedjmpZCex-pngu-nK8Ko1oyPo8d5xNdMJ8C52kKXZ1-umvj4GHBjPbB_8AEHQzVnwvdW7qV2rpD7sNrK2WPi-jM5zHWYYztrLNH4NvEvr3uTs6mrga-zYo88O1N8rnm3wMAAP__iDdIaA">