Skip to content

Commit 68d2955

Browse files
usx95vbvictor
andauthored
Apply suggestions: Remove braces
Co-authored-by: Baranov Victor <bar.victor.2002@gmail.com>
1 parent cdbb203 commit 68d2955

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

clang/lib/Analysis/LifetimeSafety.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,8 @@ class FactManager {
310310
}
311311

312312
void addBlockFacts(const CFGBlock *B, llvm::ArrayRef<Fact *> NewFacts) {
313-
if (!NewFacts.empty()) {
313+
if (!NewFacts.empty())
314314
BlockToFactsMap[B].assign(NewFacts.begin(), NewFacts.end());
315-
}
316315
}
317316

318317
template <typename FactType, typename... Args>
@@ -325,10 +324,9 @@ class FactManager {
325324
llvm::dbgs() << "==========================================\n";
326325
llvm::dbgs() << " Lifetime Analysis Facts:\n";
327326
llvm::dbgs() << "==========================================\n";
328-
if (const Decl *D = AC.getDecl()) {
327+
if (const Decl *D = AC.getDecl())
329328
if (const auto *ND = dyn_cast<NamedDecl>(D))
330329
llvm::dbgs() << "Function: " << ND->getQualifiedNameAsString() << "\n";
331-
}
332330
// Print blocks in the order as they appear in code for a stable ordering.
333331
for (const CFGBlock *B : *AC.getAnalysis<PostOrderCFGView>()) {
334332
llvm::dbgs() << " Block B" << B->getBlockID() << ":\n";
@@ -476,11 +474,9 @@ class FactGenerator : public ConstStmtVisitor<FactGenerator> {
476474
const AccessPath &LoanPath = L.Path;
477475
// Check if the loan is for a stack variable and if that variable
478476
// 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)
481479
CurrentBlockFacts.push_back(FactMgr.createFact<ExpireFact>(L.ID));
482-
}
483-
}
484480
}
485481
}
486482

0 commit comments

Comments
 (0)