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

    <tr>
        <th>Summary</th>
        <td>
            "error: identifier 'line' after '~' in destructor name does not name a type" in `struct line` that has `line` member
        </td>
    </tr>

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

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

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

<pre>
    ```cpp
#include <string_view>

struct line {
        std::string_view line;
        ~line() {
                line = {};
        }
};
```
trunk returns
> &lt;source>:5:3: error: identifier 'line' after '~' in destructor name does not name a type

```
cmd/join.cpp:49:5: error: identifier 'line' after '~' in destructor name does not name a type
   49 | ~line() {
      |                          ^~~~
      | line
cmd/join.cpp:32:21: note: non-type declaration found by destructor name lookup
   32 |                         std::string_view line;
      | ^
```

older versions return
> &lt;source>:5:3: error: expected the class name after '~' to name a destructor

All GCC versions accept this.

Don't particularly see why the member would factor into the lookup at all here, but it's not like I can call this `~(struct line)() {` or `~struct line() {`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VEGTszYM_TXiotkMsSGEAwc22XT6KzrGKMG7js3YYtP0kN_eAZKG_bptp4ePyQCSnsh7TwIVozk5ogryV8j3iRq486FyqjHvSv9h6ULWJI1vrxVs0vmn-x7SPaQ1CGmctkNLCHIXORh3-u3T0AXk2x0xnSOHQTNa4wiheH2UysgtyBpkvWidUCCfoNuUEFsQ5ZdmSMv5gXI_5Yv9smsM5_tl_qFgDjkM7gMD8RBcvCPkG4LYWAb5Gv0QNI1SZJ2DrCXIGikEH8Yb05JjczQUEEQxcyxQHXlO3MbIOGxpFu8DOnUmbD1FdJ7nSCFfe1pa9QNFfW5BHN69cavRdVln5Z3NT2SCiNno9Q6_9R6nYyz_4wH52-12-xE-Pex7WVKArMV6lOM803x1LyMnbElbFRQb7_DoB9dic_2bGuv9x9D_9Y9S_CvB_168J2vI374dzXz2tqWAnxSi8S7el-n_7hL93pNmapE7Qm1VjPehfJkh-8eonuKXVGpr8Zfd7klGaU09I3cmrpbAvXcgCsZeBTZ6sCrYK0YivHTXicKZzg0FvPjBtnhUk8vGsZ-Ks9OoGJW12FEgEDtsBkbDIIp5p6z5IPwVtXKoR9jIAWGT3kBsF18DEOViuzYp-jChvkAW9VXSVrItZakSqtbFWpTFJhNZ0lV6m5aparQ4NrQ5Zo1q01Kumzwvlaaj0ImpRCqyNFvLVGRFmq1IEJXNOm9JqHXRCshSOitjV9Z-nlc-nBIT40DVdpuXRWJVQzY-vpKhGkEvzXCKkKXWRI7PNjZsqQIhfsobKsQIhU269GiTIneKsVOTy4_cPMdkCLbqmPs47rw4gDicDHdDs9L-DOIwEr9fXvrg30kziMMkPoI4TPr_DAAA__8-sNWo">