]> granicus.if.org Git - clang/commitdiff
[analyzer] Stats: Only count the number of times we run path sensitive
authorAnna Zaks <ganna@apple.com>
Tue, 27 Mar 2012 20:02:41 +0000 (20:02 +0000)
committerAnna Zaks <ganna@apple.com>
Tue, 27 Mar 2012 20:02:41 +0000 (20:02 +0000)
analyzes.

(This method can be called twice on the same function.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153531 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp

index 5cf9e31c5b0917a84eae4eef1043c94c7e5e86fe..2b8e77745e17ea2c84dc5a9680583fd69d1a9a15 100644 (file)
@@ -430,10 +430,11 @@ void AnalysisConsumer::HandleCode(Decl *D, AnalysisMode Mode,
     if ((*WI)->hasBody()) {
       if (Mode != ANALYSIS_PATH)
         checkerMgr->runCheckersOnASTBody(*WI, *Mgr, BR);
-      if (Mode != ANALYSIS_SYNTAX && checkerMgr->hasPathSensitiveCheckers())
+      if (Mode != ANALYSIS_SYNTAX && checkerMgr->hasPathSensitiveCheckers()) {
         RunPathSensitiveChecks(*WI, VisitedCallees);
+        NumFunctionsAnalyzed++;
+      }
     }
-  NumFunctionsAnalyzed++;
 }
 
 //===----------------------------------------------------------------------===//