[PATCH] D132147: [clang][dataflow] Refactor `TestingSupport.h`

Stanislav Gatev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 26 04:42:58 PDT 2022


sgatev accepted this revision.
sgatev added inline comments.


================
Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:60
+/// Arguments for building the dataflow analysis.
+template <typename AnalysisT> struct AnalysisInputs {
+  /// Input code that is analyzed.
----------------
Could you please indicate which members are mandatory and which are optional. Perhaps comments could start either with `/// Mandatory. ...` or `/// Optional. ...`.


================
Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:244
+///
+/// Requirements:
+///
----------------
Should requirements include the full list of the requirements of `checkDataflow` below?


================
Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:295-296
 
-// Runs dataflow on the body of the function that matches `TargetFuncMatcher` in
-// code snippet `Code`. Requires: `AnalysisT` contains a type `Lattice`.
+// FIXME: Remove this function after usage has been updated to the overload
+// which uses the `AnalysisInputs` struct.
+//
----------------
Let's clearly indicate that it's deprecated.


================
Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:339-340
 
-// Runs dataflow on the body of the function named `target_fun` in code snippet
-// `code`.
+// FIXME: Remove this function after usage has been updated to the overload
+// which uses the `AnalysisInputs` struct.
+//
----------------
Let's clearly indicate that it's deprecated.


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