[PATCH] D131170: [clang][dataflow] Analyze method bodies

Stanislav Gatev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 4 07:33:46 PDT 2022


sgatev added inline comments.


================
Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:383
   StorageLocation *ReturnLoc = nullptr;
-  // FIXME: Move `ThisPointeeLoc` here from `DataflowAnalysisContext`.
+  StorageLocation *ThisPointeeLoc = nullptr;
 
----------------
Let's add a brief comment explaining what this is and when it is expected to be non-null.


================
Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:217
+    const Expr *Arg = MethodCall->getImplicitObjectArgument();
+    Env.ThisPointeeLoc = Env.getStorageLocation(*Arg, SkipPast::Reference);
+  }
----------------
What if `Arg` is null?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131170/new/

https://reviews.llvm.org/D131170



More information about the cfe-commits mailing list