[PATCH] D116597: [analyzer] Don't track function calls as control dependencies

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 5 22:14:54 PST 2022


NoQ added a comment.

Interesting. Might it be that in this scenario in order to be of interest to the user the condition value has to be trackable back to the current stack frame?

> the popular feedback we hear from some of our users, namely that they can never have too much information

They should try `prune-paths=false` in C++. Hundreds of inlined copy-constructors will definitely give them the desired experience ;)



================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1931-1933
+      // If the condition was a function call, we likely won't gain much from
+      // tracking it either. Evidence suggests that it will mostly trigger in
+      // scenarios like this:
----------------
Let's make it clear that this decision is purely stochastic: we can totally build an artificial example where this results in bad behavior but we've never seen one in practice.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116597



More information about the cfe-commits mailing list