This is the very first version of a checker that aims to find cases of infinite recursion. It relies on Add LocationContext to members of check::RegionChanges.
What it does:
- it registers on check::PreCall and check::RegionChanges events
- in checkPreCall digs through the call stack searching for invocation of currently encountered function/method with exactly the same arguments (meaning same SVals of them)
- in checkRegionChanges makes all the frames on the call stack invalid by adding them to the set of dirty frames
- if the frame encountered by the search in checkPreCall is in the set of dirty frames the search stops
Obviously this has lots of both false negatives and false positives, but I plan to improve it by decreasing the number of frame invalidations and only taking into account changes that affect whether the recursive call happens or not. The support for Obj-C method calls is also on the way.
I welcome any ideas on how to make it better!
PS. This is one of my first patches submitted here - sorry if it doesn't comply with some conventions you might have here!
Please fix indentation here