[PATCH] D128446: [clang][dataflow] Use annotations for optional diagnostic tests

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 24 05:39:24 PDT 2022


gribozavr2 accepted this revision.
gribozavr2 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp:1258
+
+              llvm::DenseSet<unsigned> AnnotationLines;
+              for (const auto &Pair : Annotations) {
----------------



================
Comment at: clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp:1264-1267
+                // statement spans multiple lines then the test will fail. Going
+                // forward, we should change this to instead just get the single
+                // line number from the annotation itself, rather than looking
+                // at the statement it's attached to.
----------------
But maybe there's an easy way to do that -- change checkDataflowDiagnosis pass down the llvm::Annotations objects to this callback? You could even make that change in the earlier patch in the stack.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128446



More information about the cfe-commits mailing list