================
@@ -1016,6 +1016,28 @@ class TrivialFunctionAnalysisVisitor
               (CtorDecl->isMoveConstructor() &&
                RD->hasTrivialMoveConstructor()))
             return true;
+          // A defaulted default constructor that nothing has used yet has no
+          // definition, so decide from the initializers it would run.
+          if (CtorDecl->isDefaultConstructor() && !CtorDecl->isDeleted() &&
+              !CtorDecl->doesThisDeclarationHaveABody() &&
+              RD->hasDefinition()) {
----------------
steakhal wrote:

What I don't understand is that if it has a definition, why don't we go there 
and check the body of that?
Isn't that the ast visitor ignores implicit code thus ignores the defaulted 
bodies?

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

Reply via email to