[clang] 1412210 - [clang][dataflow][NFC] Fix code formatting in DataflowEnvironment.cpp (#89352)

via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 19 01:13:01 PDT 2024


Author: martinboehme
Date: 2024-04-19T10:12:57+02:00
New Revision: 14122106320b88f114301bbf8694ceac9bb7a27a

URL: https://github.com/llvm/llvm-project/commit/14122106320b88f114301bbf8694ceac9bb7a27a
DIFF: https://github.com/llvm/llvm-project/commit/14122106320b88f114301bbf8694ceac9bb7a27a.diff

LOG: [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.

Added: 
    

Modified: 
    clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
index 6998e6d7a5170b..05395e07a7a68c 100644
--- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
@@ -400,8 +400,8 @@ class ResultObjectVisitor : public RecursiveASTVisitor<ResultObjectVisitor> {
       // Fields of non-record type are handled in
       // `TransferVisitor::VisitInitListExpr()`.
       if (Field->getType()->isRecordType())
-        PropagateResultObject(Init,
-                              cast<RecordStorageLocation>(Loc->getChild(*Field)));
+        PropagateResultObject(
+            Init, cast<RecordStorageLocation>(Loc->getChild(*Field)));
     }
   }
 
@@ -610,8 +610,8 @@ Environment Environment::pushCall(const CallExpr *Call) const {
   if (const auto *MethodCall = dyn_cast<CXXMemberCallExpr>(Call)) {
     if (const Expr *Arg = MethodCall->getImplicitObjectArgument()) {
       if (!isa<CXXThisExpr>(Arg))
-          Env.ThisPointeeLoc =
-              cast<RecordStorageLocation>(getStorageLocation(*Arg));
+        Env.ThisPointeeLoc =
+            cast<RecordStorageLocation>(getStorageLocation(*Arg));
       // Otherwise (when the argument is `this`), retain the current
       // environment's `ThisPointeeLoc`.
     }
@@ -1083,7 +1083,7 @@ StorageLocation &Environment::createObjectInternal(const ValueDecl *D,
     // be null.
     if (InitExpr) {
       if (auto *InitExprLoc = getStorageLocation(*InitExpr))
-          return *InitExprLoc;
+        return *InitExprLoc;
     }
 
     // Even though we have an initializer, we might not get an
@@ -1191,9 +1191,7 @@ void Environment::dump(raw_ostream &OS) const {
   DACtx->dumpFlowCondition(FlowConditionToken, OS);
 }
 
-void Environment::dump() const {
-  dump(llvm::dbgs());
-}
+void Environment::dump() const { dump(llvm::dbgs()); }
 
 Environment::PrValueToResultObject Environment::buildResultObjectMap(
     DataflowAnalysisContext *DACtx, const FunctionDecl *FuncDecl,


        


More information about the cfe-commits mailing list