With the Microsoft ABI, some destructors need to offset a parameter to
get the derived this pointer, in which case the type of that parameter
should not be a pointer to the derived type.
Fixes #60465
Differential D143233
[Clang][CodeGen] Fix this argument type for certain destructors jacobly on Feb 2 2023, 5:05 PM. Authored by
Details
Diff Detail
Event TimelineComment Actions Please be sure to add release notes to clang/docs/ReleaseNotes.rst Things look reasonable to me, but it'd be nice if someone with more Windows ABI experience could take a look as well.
Comment Actions If the parameter attributes are relevant, should we change the CHECK lines in the tests to check for them? At least for some of the tests. Once we fix these tests to enable opaque pointer types, you won't actually be checking for anything. Comment Actions I was hoping @rnk was available for review, but otherwise this is ready to land and I don't have commit access. Comment Actions Maybe worth cherry-picking to 16 branch? I think someone will need to rebase onto the branch for that, though; there was merge conflict on the microsoft-abi-eh-cleanups.cpp change. Comment Actions I wouldn't be opposed to picking this onto 16 given that it's fixing an ABI issue, if someone wants to do the work to cherry-pick it. |