Skip to content

Commit 43d28dc

Browse files
committed
[LifetimeSafety] Track view types/gsl::Pointer.
1 parent f590db6 commit 43d28dc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

clang/lib/Analysis/LifetimeSafety.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,15 @@ class FactGenerator : public ConstStmtVisitor<FactGenerator> {
398398
CurrentBlockFacts.clear();
399399
for (unsigned I = 0; I < Block->size(); ++I) {
400400
const CFGElement &Element = Block->Elements[I];
401-
if (std::optional<CFGStmt> CS = Element.getAs<CFGStmt>())
401+
if (std::optional<CFGStmt> CS = Element.getAs<CFGStmt>()) {
402+
DEBUG_WITH_TYPE("PrintCFG",
403+
llvm::dbgs()
404+
<< "======CFGStmt and ASTStmt========\n");
405+
DEBUG_WITH_TYPE("PrintCFG", CS->dump());
406+
DEBUG_WITH_TYPE("PrintCFG", CS->getStmt()->dumpColor());
402407
Visit(CS->getStmt());
403-
else if (std::optional<CFGAutomaticObjDtor> DtorOpt =
404-
Element.getAs<CFGAutomaticObjDtor>())
408+
} else if (std::optional<CFGAutomaticObjDtor> DtorOpt =
409+
Element.getAs<CFGAutomaticObjDtor>())
405410
handleDestructor(*DtorOpt);
406411
}
407412
FactMgr.addBlockFacts(Block, CurrentBlockFacts);

0 commit comments

Comments
 (0)