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

    <tr>
        <th>Summary</th>
        <td>
            clang-18 does not synthesize destructor
        </td>
    </tr>

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

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

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

<pre>
    This was discovered while transitioning to clang-18.

```
$ cat p.cc
```
```
struct a {
  ~a() {
  }
};

struct qq {
  qq() {
  }
  a f;
};

struct s {
  qq *x = new qq[10];
};

int main() {
  s q;
}
```
```
$ clang++-18 p.cc -lstdc++
/usr/bin/ld: /tmp/p-d2a9cb.o: in function `s::s()':
p.cc:(.text._ZN1sC2Ev[_ZN1sC2Ev]+0xa8): undefined reference to `qq::~qq()'
clang++-18: error: linker command failed with exit code 1 (use -v to see invocation)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU02P4zYM_TX0hYgh0x-xDz7ETX3soeipl0KW5FitIyWSnMn0ML99ISfBJNjdwQKGLdLkexT5yL3XB6NUC2UH5T7hS5isa_-0g3LBdvxguOPJYOV7-9ekPb5xj1J7YS_KKYlvk54VBseN10Fbo80Bg0Uxc3PYZHUKbA9sd39X7P7cTCpQ8ICnVIgfB7yaPrhFBOQI2-7mQfzgQDVQ8-yD7f6ev91D3j1XcIc4n5_jz-cvMBA5jp8oP0P0r4AItLsi5Hs06i0SlF3GoNx_AaRNwCPX5vtaPJ5f8n6hVWtr4wiAOqBuk9Vrl3Ez-yDFzfmI7BfvgPohUvezhHyHQH04noD600YSb8SQ2ujWBsfFiDhmhIp5yHeQ7_ytYqBttFfQdaL5DqhOg7qG9J-__8j8b_T7Bcru6bwH6tiVr9n5Dhcj1aiNkujUqJwyQkUpQcXO5xvVx2NUkWxler1kRFHOWRcPszb_KYfCHo_cSBy5nqNedZhQXXVAYaXCDIHqxSvcXCKXVwq1uVjB4yUj0Wt3E9nmsskbnqg222ZVXddZRcnUDmzgzcAGyYZBjttqYGOZyaZoqKSirodEt8SoYCXVrCEqKM3rsRQlbStWlaIpCiiYOnI9p_N8OabWHRLt_aLaJi-zOpn5oGa_7ihR1NT6E4jiyro25myG5eChYLP2wX-iBB1m1T72EaVVHo0N6N9NmJTX_yuU6qZi65LFze0UwmmdLfVA_UGHaRlSYY9RHvPl8dmcnP1XiQDUr7V4oP5W66WlbwEAAP__Tho2aw">