================ @@ -3893,9 +3893,12 @@ namespace { } void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *E) { - if (E->getTemporary()->getDestructor()->isTrivial()) { - Inherited::VisitStmt(E); - return; + if (const CXXDestructorDecl *DtorDecl = + E->getTemporary()->getDestructor()) { + if (DtorDecl->isTrivial()) { + Inherited::VisitStmt(E); + return; + } ---------------- cor3ntin wrote:
I think I'm happy with doing it it here, but it would be helpful to add a comment. If someone has a better idea and want to inspects all places where CXXBindTemporaryExpr is created, we can do that in a subsequent PR. https://github.com/llvm/llvm-project/pull/90220 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits