Skip to content

Commit 1412210

Browse files
authored
[clang][dataflow][NFC] Fix code formatting in DataflowEnvironment.cpp (#89352)
For some reason, when I merged #89235, two lines were mis-formatted. This patch corrects this; while I'm here, I'm also correcting other existing formatting errors.
1 parent 14193f4 commit 1412210

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ class ResultObjectVisitor : public RecursiveASTVisitor<ResultObjectVisitor> {
400400
// Fields of non-record type are handled in
401401
// `TransferVisitor::VisitInitListExpr()`.
402402
if (Field->getType()->isRecordType())
403-
PropagateResultObject(Init,
404-
cast<RecordStorageLocation>(Loc->getChild(*Field)));
403+
PropagateResultObject(
404+
Init, cast<RecordStorageLocation>(Loc->getChild(*Field)));
405405
}
406406
}
407407

@@ -610,8 +610,8 @@ Environment Environment::pushCall(const CallExpr *Call) const {
610610
if (const auto *MethodCall = dyn_cast<CXXMemberCallExpr>(Call)) {
611611
if (const Expr *Arg = MethodCall->getImplicitObjectArgument()) {
612612
if (!isa<CXXThisExpr>(Arg))
613-
Env.ThisPointeeLoc =
614-
cast<RecordStorageLocation>(getStorageLocation(*Arg));
613+
Env.ThisPointeeLoc =
614+
cast<RecordStorageLocation>(getStorageLocation(*Arg));
615615
// Otherwise (when the argument is `this`), retain the current
616616
// environment's `ThisPointeeLoc`.
617617
}
@@ -1083,7 +1083,7 @@ StorageLocation &Environment::createObjectInternal(const ValueDecl *D,
10831083
// be null.
10841084
if (InitExpr) {
10851085
if (auto *InitExprLoc = getStorageLocation(*InitExpr))
1086-
return *InitExprLoc;
1086+
return *InitExprLoc;
10871087
}
10881088

10891089
// Even though we have an initializer, we might not get an
@@ -1191,9 +1191,7 @@ void Environment::dump(raw_ostream &OS) const {
11911191
DACtx->dumpFlowCondition(FlowConditionToken, OS);
11921192
}
11931193

1194-
void Environment::dump() const {
1195-
dump(llvm::dbgs());
1196-
}
1194+
void Environment::dump() const { dump(llvm::dbgs()); }
11971195

11981196
Environment::PrValueToResultObject Environment::buildResultObjectMap(
11991197
DataflowAnalysisContext *DACtx, const FunctionDecl *FuncDecl,

0 commit comments

Comments
 (0)