aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp8
-rw-r--r--test/Analysis/objc-method-coverage.m5
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index a531f6df3f..6133e168c4 100644
--- a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -53,9 +53,10 @@ static ExplodedNode::Auditor* CreateUbiViz();
STATISTIC(NumFunctionTopLevel, "The # of functions at top level.");
STATISTIC(NumFunctionsAnalyzed,
- "The # of functions and blocks analyzed (as top level).");
+ "The # of functions and blocks analyzed (as top level "
+ "with inlining turned on).");
STATISTIC(NumBlocksInAnalyzedFunctions,
- "The # of basic blocks in the analyzed functions.");
+ "The # of basic blocks in the analyzed functions.");
STATISTIC(PercentReachableBlocks, "The % of reachable basic blocks.");
STATISTIC(MaxCFGSize, "The maximum number of basic blocks in a function.");
@@ -617,7 +618,8 @@ void AnalysisConsumer::HandleCode(Decl *D, AnalysisMode Mode,
checkerMgr->runCheckersOnASTBody(*WI, *Mgr, BR);
if ((Mode & AM_Path) && checkerMgr->hasPathSensitiveCheckers()) {
RunPathSensitiveChecks(*WI, IMode, VisitedCallees);
- NumFunctionsAnalyzed++;
+ if (IMode != ExprEngine::Inline_None)
+ NumFunctionsAnalyzed++;
}
}
}
diff --git a/test/Analysis/objc-method-coverage.m b/test/Analysis/objc-method-coverage.m
index 50a4888dfa..cb66bff19b 100644
--- a/test/Analysis/objc-method-coverage.m
+++ b/test/Analysis/objc-method-coverage.m
@@ -1,6 +1,4 @@
// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-stats -fblocks %s 2>&1 | FileCheck %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-ipa=none -analyzer-stats -fblocks %s 2>&1 | FileCheck %s
-
@interface I
int f() {
return 0;
@@ -14,4 +12,5 @@ int f() {
@end
// CHECK: ... Statistics Collected ...
-// CHECK: 2 AnalysisConsumer - The # of functions and blocks analyzed (as top level). \ No newline at end of file
+// CHECK: 2 AnalysisConsumer - The # of functions and blocks analyzed (as top level with inlining turned on).
+// CHECK: 100 AnalysisConsumer - The % of reachable basic blocks. \ No newline at end of file