[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 28 13:31:42 PDT 2022


gribozavr2 accepted this revision.
gribozavr2 added inline comments.


================
Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:78
+public:
+  UncheckedOptionalAccessDiagnosis(
+      ASTContext &AstContext, UncheckedOptionalAccessModelOptions Options = {});
----------------
samestep wrote:
> gribozavr2 wrote:
> > "Diagnosis" sounds like the result. Should this be a "Diagnoser"?
> Sure, I can change it to say "Diagnoser" instead (unless we want to just replace it with "Visitor").
Not done?


================
Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:144-145
 
+// Runs dataflow on the body of the function that matches `func_matcher` in code
+// snippet `code`. Requires: `Analysis` contains a type `Lattice`.
+template <typename AnalysisT>
----------------



================
Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:155
+        ASTContext &)>
+        Expectations,
+    ArrayRef<std::string> Args,
----------------



================
Comment at: clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp:2338
   //       if (opt1.has_value()) {
   //         opt2.value();
   //       }
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127898



More information about the cfe-commits mailing list