[PATCH] D74615: [Analyzer] Add visitor to track iterator invalidation

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 19:37:01 PDT 2020


NoQ added a comment.
Herald added a subscriber: ASDenysPetrov.

> However, if //something// happens to the value in a transition which is done by another checker (or the core engine) then

... then //that// checker (or the engine) adds a tag in order to explain itself, because from its point of view it

> //does// something with a value when adding a new transition

.

-----

> This may result in double notes like `All iterators of 'V' after 'i1' are invalidated.` and then the next is `Iterator 'i0' is invalidated`.

Not if interestingness checks are performed correctly. Before emitting such note, the note tag should ask the bug report whether it's interested in all iterators being invalidated, or in how a particular iterator is invalidated. If `PathSensitiveBugReport` is not flexible enough to answer such questions, we should improve it.

-----

> We already have such double notes: Assuming the condition is 'true'. then Taking 'true' branch..

These are not double notes. The former describes the arbitrary state split, thus indicating that there is no concrete knowledge about the branch condition up to this point, while the latter describes the control flow in the program. Also the "Taking..." notes are displayed as arrows rather than as bubbles by GUIs that read plists, so basically everything except scan-build.


Repository:
  rC Clang

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

https://reviews.llvm.org/D74615





More information about the cfe-commits mailing list