[PATCH] D80905: [analyzer] Introduce weak dependencies to express *preferred* checker callback evaluation order

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 05:58:06 PDT 2020


Szelethus marked 3 inline comments as done.
Szelethus added inline comments.


================
Comment at: clang/include/clang/StaticAnalyzer/Checkers/CheckerBase.td:141-142
+/// Describes preferred registration and evaluation order in between checkers.
+/// Unlike strong dependencies, this expresses dependencies in between
+/// diagnostics, and *not* modeling. In the case of an unsatisfied (disabled)
+/// weak dependency, the dependent checker might still be registered. If the
----------------
NoQ wrote:
> Szelethus wrote:
> > NoQ wrote:
> > > I wouldn't mind having predictable callback evaluation order for modeling as well. What's causing you to drop this scenario?
> > D80905#2066219
> Ok, so do i understand it correctly that the only reason you're omitting the "and modeling" clause here is because in your ultimate vision (which i completely agree with) checkers either do modeling or checking, and modeling-checkers never need to be disabled to begin with, so weak dependencies are useless for them, which is why this whole patch is entirely about diagnostics?
Pretty much, yes. Its not just useless -- I don't think establishing a //preferred// evaluation order over //guaranteed// for modeling checkers could ever be correct. Not only that, I think adding new kinds of dependencies must be very well justified to counterweight the extra complexity, they should be intuitive and "just work". There would be a lot of corner cases if these dependencies could be too intertwined, and not only would they be a mess to implement, it could be confusing on the checker developer's end.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80905





More information about the cfe-commits mailing list