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

    <tr>
        <th>Summary</th>
        <td>
            Clang accepts invalid parenthesized template name in deduction guide declaration
        </td>
    </tr>

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

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

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

<pre>
    Along the same lines as #152018, but a somewhat different case:

```c++
template<typename T> struct X {};
(X)() -> X<int>;
```

Clang accepts, but this is invalid: the [syntax for deduction guides](https://eel.is/c++draft/temp.deduct.guide) does not allow parentheses around the *template-name*.

While GCC accepts this, other implementations (EDG, MSVC) do not, so it would probably make sense for clang to also reject.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxckk-PozgQxT9NcSkFETskcOCQP50-7WlXu301uADvGBvZRfekP_3IJJlWj1QSEi673u_VUzGawRE1UJ6gvGRq4dGH5vM2eOuNzlqvb83Rejcgj4RRTYTWOIqoIoKQ21IU2wrEGduFUWH0E32MilGbvqdAjrFTkUAeoVhrX9yrA3FKVRyZptkqJpBnvs3k0oh_QL5g5LB0jG8IhxMcLiBTN4jqDUQNogJR4yb1vYE8G8cgXx4tzxn3kWer3ICq62jm-FTKo4mYyr0razTI48oH5SneHKuf2PuAmvTSsfEOh8VoilBeQFQj8xwTkLiCuBLZ3EQQ1weQDqpnENdEld8fyNfbSa72FNF5RmWt_8BZJYNGisnO4Ben7yLEb082yQ0Qx_yO8t9oLOHr-fzEWTkSk-eRAppptjSRY5VUpwVVL5fXdP7X3_-e7wrS_PQnejSMH36xGufgW9XaG07qB2EkF2k1oFutY4_KRo-B_qeO80w3UteyVhk120O5k7Is6202Nroo291-J8qqPLR9V_VSi4oORaf6vaplmZlGFKIsqmK3rcVebvNKyV1V6kO7LWSliwPsCpqUsbm171Puw5CZGBdq1pTVmVUt2bhGVYhVGwiRUhuadGHTLkOEXWFN5Pj1BBu21HxLwXPtXxswn6Tx6TquGTTuzwCgps6qsJqbLcE236MwGB6XNu_8BOKaxj8-mzn45ByI64qT0vIgem_ErwAAAP__PeIfDw">