[StaticAnalyzer] Move inline counter increaser to inlineCall function

Even though the shouldInlineCall function returns true, it can happen that the
function is not going to be inlined (as it can be seen at line 913 and below).
Moved the bumpNumTimesInlined(D) (the counter increaser) call to the inlineCall
function where it logically belongs.

Differential Revision: https://reviews.llvm.org/D32179

llvm-svn: 303158
This commit is contained in:
Peter Szecsi 2017-05-16 11:54:00 +00:00
parent be6ef0eff9
commit 32134db1a1
1 changed files with 1 additions and 2 deletions

View File

@ -447,6 +447,7 @@ bool ExprEngine::inlineCall(const CallEvent &Call, const Decl *D,
Bldr.takeNodes(Pred);
NumInlinedCalls++;
Engine.FunctionSummaries->bumpNumTimesInlined(D);
// Mark the decl as visited.
if (VisitedCallees)
@ -868,8 +869,6 @@ bool ExprEngine::shouldInlineCall(const CallEvent &Call, const Decl *D,
|| IsRecursive))
return false;
Engine.FunctionSummaries->bumpNumTimesInlined(D);
return true;
}