Skip to content

Commit c073ef3

Browse files
committed
fix tests
1 parent cea509d commit c073ef3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

clang/lib/Analysis/LifetimeSafety.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,10 @@ join(llvm::ImmutableMap<K, V> A, llvm::ImmutableMap<K, V> B,
643643
for (const auto &Entry : B) {
644644
const K &Key = Entry.first;
645645
const V &ValB = Entry.second;
646-
const V &ValA = *A.lookup(Key);
647-
A = F.add(A, Key, joinValues(ValA, ValB));
646+
if (const V *ValA = A.lookup(Key))
647+
A = F.add(A, Key, joinValues(*ValA, ValB));
648+
else
649+
A = F.add(A, Key, ValB);
648650
}
649651
return A;
650652
}
@@ -719,7 +721,7 @@ class LoanPropagationAnalysis
719721

720722
using DataflowAnalysis<LoanPropagationAnalysis, Lattice>::transfer;
721723

722-
const char *getAnalysisName() const { return "Loan Propagation"; }
724+
const char *getAnalysisName() const { return "LoanPropagation"; }
723725

724726
Lattice getInitialState() { return Lattice{}; }
725727

0 commit comments

Comments
 (0)