File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ struct TransferFunctions : public StmtVisitor<TransferFunctions> {
475475 Obj = MTE->getSubExpr ();
476476 if (auto *DRE = dyn_cast<DeclRefExpr>(Obj)) {
477477 auto *D = dyn_cast<VarDecl>(DRE->getDecl ());
478- if (D->hasInit ())
478+ if (D && D ->hasInit ())
479479 Obj = D->getInit ();
480480 }
481481 Visit (Obj);
@@ -487,9 +487,8 @@ struct TransferFunctions : public StmtVisitor<TransferFunctions> {
487487 for (const LambdaCapture &Capture : LE->captures ())
488488 if (Capture.capturesVariable ())
489489 if (const VarDecl *VD = dyn_cast<VarDecl>(Capture.getCapturedVar ()))
490- if (VD == Var)
491- if (Capture.getCaptureKind () == LCK_ByRef)
492- AllValuesAreNoReturn = false ;
490+ if (VD == Var && Capture.getCaptureKind () == LCK_ByRef)
491+ AllValuesAreNoReturn = false ;
493492 }
494493
495494 void VisitMaterializeTemporaryExpr (MaterializeTemporaryExpr *MTE) {
You can’t perform that action at this time.
0 commit comments