summaryrefslogtreecommitdiffstats
path: root/lib/StaticAnalyzer
diff options
context:
space:
mode:
authorPeter Szecsi <szepet95@gmail.com>2017-05-16 11:54:00 +0000
committerPeter Szecsi <szepet95@gmail.com>2017-05-16 11:54:00 +0000
commitb5e2ee2f62458c5f3f726fffed4a9c193b722c6f (patch)
tree45e1920f432fff5b478cbd0e0fce75b161b98a73 /lib/StaticAnalyzer
parentaf473b4213ef00e23a340ec013a827e4c8c96d5b (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer')
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp b/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
index 39d88bfda1..caf86b26b6 100644
--- a/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
@@ -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;
}