D105553 added NoStateChangeFuncVisitor, an abstract class to aid in creating notes such as "Returning without writing to 'x'", or "Returning without changing the ownership status of allocated memory". Its clients need to define, among other things, what a change of state is.
For code like this:
f() { g(); } foo() { f(); h(); }
We'd have a path in the ExplodedGraph that looks like this:
-- <g> --> / \ --- <f> --------> --- <h> ---> / \ / \ -------- <foo> ------ <foo> -->
When we're interested in whether f neglected to change some property, NoStateChangeFuncVisitor asks these questions:
÷×~ -- <g> --> ß / \$ @&#* --- <f> --------> --- <h> ---> / \ / \ -------- <foo> ------ <foo> --> Has anything changed in between # and *? Has anything changed in between & and *? Has anything changed in between @ and *? ... Has anything changed in between $ and *? Has anything changed in between × and ~? Has anything changed in between ÷ and ~? ... Has anything changed in between ß and *? ...
This is a rather thorough line of questioning, which is why in D105819, I was only interested in whether state *right before* and *right after* a function call changed, and early returned to the CallEnter location:
if (!CurrN->getLocationAs<CallEnter>()) return;
Except that I made a typo, and forgot to negate the condition. So, in this patch, I'm fixing that, and under the same hood allow all clients to decide to do this whole-function check instead of the thorough one.
You have no such parameter. But I guess we can get that from either of them.