[PATCH] D131039: [clang][dataflow] Add cache of `ControlFlowContext`s for function decls.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 3 10:33:20 PDT 2022


xazax.hun added inline comments.


================
Comment at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:38
+
+  // DEPRECATED. Use overload above.
   static llvm::Expected<ControlFlowContext> build(const Decl *D, Stmt *S,
----------------
I think LLVM can use the `[[deprecated]]` attribute.


================
Comment at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:63-65
+  const Decl *ContainingDecl;
   std::unique_ptr<CFG> Cfg;
   llvm::DenseMap<const Stmt *, const CFGBlock *> StmtToBlock;
----------------
This starts to look more and more similar to `AnalysisDeclContext`. I wonder if at some point we should factor the common code out into a common base class or something.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131039



More information about the cfe-commits mailing list