================
@@ -2800,6 +2801,15 @@ void CodeGenModule::ConstructAttributeList(StringRef 
Name,
             .getAsAlign();
     Attrs.addAlignmentAttr(Alignment);
 
+    if (isa_and_nonnull<CXXDestructorDecl>(
+            CalleeInfo.getCalleeDecl().getDecl())) {
+      auto *ClassDecl = dyn_cast<CXXRecordDecl>(
+          CalleeInfo.getCalleeDecl().getDecl()->getDeclContext());
+      if (ClassDecl->getNumBases() == 0 && ClassDecl->getNumVBases() == 0) {
----------------
rnk wrote:

Why do we have to limit this to only destructors of classes with no bases? 
Whatever the reason (caution, incremental change, etc), comments here would be 
appreciated.

https://github.com/llvm/llvm-project/pull/166276
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to