Skip to content

Commit e61817a

Browse files
committed
[LifetimeSafety] Do not create two loans for the same expression
1 parent 43d28dc commit e61817a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/lib/Analysis/LifetimeSafety.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ class FactGenerator : public ConstStmtVisitor<FactGenerator> {
396396
// initializations and destructions are processed in the correct sequence.
397397
for (const CFGBlock *Block : *AC.getAnalysis<PostOrderCFGView>()) {
398398
CurrentBlockFacts.clear();
399+
VisitedStmts.clear();
399400
for (unsigned I = 0; I < Block->size(); ++I) {
400401
const CFGElement &Element = Block->Elements[I];
401402
if (std::optional<CFGStmt> CS = Element.getAs<CFGStmt>()) {

0 commit comments

Comments
 (0)