[PATCH] D12780: [analyzer] Add generateErrorNode() APIs to CheckerContext

Anna Zaks via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 11 16:09:32 PDT 2015


zaks.anna added inline comments.

================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:321
@@ +320,3 @@
+    // sink, we assume that a client requesting a transition to a state that is
+    // the same as the predecessor state has made a mistake. We return the
+    // predecessor and rather than cache out.
----------------
dcoughlin wrote:
> jordan_rose wrote:
> > What does "has made a mistake" mean? What is the mistake and how will they discover it?
> The mistake this guard protects against is adding a transition from a state to itself, which would normally cause a cache out. My understanding is that the whole point of this guard is to silently swallow that mistake. I found that surprising, which is why I added the comment.
Should we add an assert here? I wonder if/how much it will get triggered.


http://reviews.llvm.org/D12780





More information about the cfe-commits mailing list