@@ -310,9 +310,8 @@ class FactManager {
310
310
}
311
311
312
312
void addBlockFacts (const CFGBlock *B, llvm::ArrayRef<Fact *> NewFacts) {
313
- if (!NewFacts.empty ()) {
313
+ if (!NewFacts.empty ())
314
314
BlockToFactsMap[B].assign (NewFacts.begin (), NewFacts.end ());
315
- }
316
315
}
317
316
318
317
template <typename FactType, typename ... Args>
@@ -325,10 +324,9 @@ class FactManager {
325
324
llvm::dbgs () << " ==========================================\n " ;
326
325
llvm::dbgs () << " Lifetime Analysis Facts:\n " ;
327
326
llvm::dbgs () << " ==========================================\n " ;
328
- if (const Decl *D = AC.getDecl ()) {
327
+ if (const Decl *D = AC.getDecl ())
329
328
if (const auto *ND = dyn_cast<NamedDecl>(D))
330
329
llvm::dbgs () << " Function: " << ND->getQualifiedNameAsString () << " \n " ;
331
- }
332
330
// Print blocks in the order as they appear in code for a stable ordering.
333
331
for (const CFGBlock *B : *AC.getAnalysis <PostOrderCFGView>()) {
334
332
llvm::dbgs () << " Block B" << B->getBlockID () << " :\n " ;
@@ -476,11 +474,9 @@ class FactGenerator : public ConstStmtVisitor<FactGenerator> {
476
474
const AccessPath &LoanPath = L.Path ;
477
475
// Check if the loan is for a stack variable and if that variable
478
476
// is the one being destructed.
479
- if (LoanPath.PathKind == AccessPath::Kind::StackVariable) {
480
- if (LoanPath.D == DestructedVD) {
477
+ if (LoanPath.PathKind == AccessPath::Kind::StackVariable)
478
+ if (LoanPath.D == DestructedVD)
481
479
CurrentBlockFacts.push_back (FactMgr.createFact <ExpireFact>(L.ID ));
482
- }
483
- }
484
480
}
485
481
}
486
482
0 commit comments