Skip to content

Commit 9a2e5be

Browse files
committed
address comments
1 parent 123045c commit 9a2e5be

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

clang/lib/Analysis/LifetimeSafety.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ class Transferer {
652652
Factory.OriginMapFact.add(InState.Origins, DestOID, SrcLoans));
653653
}
654654
};
655+
655656
// ========================================================================= //
656657
// Dataflow analysis
657658
// ========================================================================= //
@@ -719,19 +720,11 @@ class LifetimeDataflow {
719720
}
720721

721722
LifetimeLattice getEntryState(const CFGBlock *B) const {
722-
auto It = BlockEntryStates.find(B);
723-
if (It != BlockEntryStates.end()) {
724-
return It->second;
725-
}
726-
return LifetimeLattice{};
723+
return BlockEntryStates.lookup(B);
727724
}
728725

729726
LifetimeLattice getExitState(const CFGBlock *B) const {
730-
auto It = BlockExitStates.find(B);
731-
if (It != BlockExitStates.end()) {
732-
return It->second;
733-
}
734-
return LifetimeLattice{};
727+
return BlockExitStates.lookup(B);
735728
}
736729
};
737730

0 commit comments

Comments
 (0)