All the use cases of CallAnalyzer use the same call site parameter to
both construct the CallAnalyzer, and then pass to the analysis member.
This change removes this duplication.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
There appear to be unrelated changes due to clang-format. I created https://reviews.llvm.org/D71646 to capture just those changes, and I plan to submit that first, then this one.
It looks like some of changes are the same as this patch https://reviews.llvm.org/D71646.
Please based on https://reviews.llvm.org/D71646 this patch to make change.
There is comment like this:
/// The candidate callsite being analyzed. Please do not use this to do /// analysis in the caller function; we want the inline cost query to be /// easily cacheable. Instead, use the cover function paramHasAttr. CallBase &CandidateCall;
Can you find out the history of this field?
On the other hand, if a different callsite is passed to analyzeCall other than CandidateCall, it will produce wrong results.
It seems it was introduced here: http://reviews.llvm.org/D9129. analyzeCall was already taking a CallSite parameter.
On the other hand, if a different callsite is passed to analyzeCall other than CandidateCall, it will produce wrong results.
That's the thing: the API is local to this file, and there is no case when we pass a different parameter to analyzeCall, than the parameter used to construct the CallAnalyzer object.