[clang] [Clang] Mark this pointer in destructors dead_on_return (PR #166276)

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 1 10:53:43 PST 2025


================
@@ -2800,6 +2801,15 @@ void CodeGenModule::ConstructAttributeList(StringRef Name,
             .getAsAlign();
     Attrs.addAlignmentAttr(Alignment);
 
+    if (isa_and_nonnull<CXXDestructorDecl>(
----------------
rnk wrote:

Code golf: You can CSE the CalleeInfo.getCalleeDecl().getDecl() if you use dyn_cast_or_nonnull.

https://github.com/llvm/llvm-project/pull/166276


More information about the cfe-commits mailing list