This patch uses the caching added in D109844 to analyze calls. It adds a
variant of callCapturesBefore which should only be called if the object
does not escape before the call. I am happy to adjust the naming and
structure of the changes in CaptureTracking and I'll add a doc-comment
once everything is settled.
Fixes PR50220.
I'm really confused by this API. My understanding is that it computes the ModRefInfo of the call under the assumption that the object is not captured before *or at* the call. The implementation skips over non-nocapture arguments on the premise that these must have already been checked. It only checks whether there are arguments that may mod/ref the object without capturing. With that in mind, the API name seems to be the opposite of what it actually does.