[cfe-commits] r170362 - in /cfe/trunk: lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp test/Analysis/objc-method-coverage.m
Anna Zaks
ganna at apple.com
Mon Dec 17 12:08:55 PST 2012
Author: zaks
Date: Mon Dec 17 14:08:54 2012
New Revision: 170362
URL: http://llvm.org/viewvc/llvm-project?rev=170362&view=rev
Log:
[analyzer] Tweak the NumFunctionsAnalyzed stat so that it's more useful.
Modified:
cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
cfe/trunk/test/Analysis/objc-method-coverage.m
Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp?rev=170362&r1=170361&r2=170362&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp Mon Dec 17 14:08:54 2012
@@ -53,9 +53,10 @@
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 @@
checkerMgr->runCheckersOnASTBody(*WI, *Mgr, BR);
if ((Mode & AM_Path) && checkerMgr->hasPathSensitiveCheckers()) {
RunPathSensitiveChecks(*WI, IMode, VisitedCallees);
- NumFunctionsAnalyzed++;
+ if (IMode != ExprEngine::Inline_None)
+ NumFunctionsAnalyzed++;
}
}
}
Modified: cfe/trunk/test/Analysis/objc-method-coverage.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/objc-method-coverage.m?rev=170362&r1=170361&r2=170362&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/objc-method-coverage.m (original)
+++ cfe/trunk/test/Analysis/objc-method-coverage.m Mon Dec 17 14:08:54 2012
@@ -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 @@
@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
More information about the cfe-commits
mailing list