[clang] [Clang] Mark this pointer in destructors dead_on_return (PR #166276)
Aiden Grossman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 21 10:16:33 PST 2026
boomanaiden154 wrote:
Now that https://github.com/llvm/llvm-project/pull/171712 has landed to support a sized `dead_on_return` attribute, I've updated the patch:
1. I've made the attribute sized using info from `getMinimumClassObjectSize()`. Based on my reading of the function definition/comments, that seems right, and it does the right thing in all of the cases I have looked at.
2. I added a test to cover this behavior specifically (`destructor_dead_on_return.cpp`).
3. I've dropped all the other test changes for now so they do not clutter review given I need to redo them all anyways not that the IR syntax has changed.
https://github.com/llvm/llvm-project/pull/166276
More information about the cfe-commits
mailing list