[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`
    Dmitri Gribenko via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Aug 18 11:58:07 PDT 2022
    
    
  
gribozavr2 added inline comments.
================
Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:60
+/// Arguments for building the dataflow analysis.
+template <typename AnalysisT> struct AnalysisArguments {
+  /// Input code that is analyzed.
----------------
AnalysisInputs?
================
Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:82
+/// Contains data structures required and produced by a dataflow analysis run.
 struct AnalysisData {
+  /// Input code that is analyzed. Points within the code may be marked with
----------------
AnalysisOutputs?
================
Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:125
+    std::pair<std::string, DataflowAnalysisState<typename AnalysisT::Lattice>>>>
+getAnnotationStates(AnalysisData &AD) {
+  using StateT = DataflowAnalysisState<typename AnalysisT::Lattice>;
----------------
Could we capture the lattice elements in the PostVisitCFG callback? It already receives the lattice element, we can easily copy it when the CFGElement is the Stmt of interest.
That should allow us to remove this function completely!
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132147/new/
https://reviews.llvm.org/D132147
    
    
More information about the cfe-commits
mailing list