================ @@ -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; + } ---------------- Sirraide wrote:
I’ve been looking at some of the other uses of `CXXTemporary`, and it does seem like there are other places where we check for it being null, but it also doesn’t seem to be consistent (at least I’m not seeing a pattern here), and doing so also seems a bit contrary to the documentation here. 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