// which represent a path-sensitive, intra-procedural "exploded graph."
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "CoreEngine"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/Statistic.h"
#include <vector>
using namespace clang;
using namespace ento;
+STATISTIC(NumNodesWithMoreThanTwoSucc,
+ "The # of nodes with more than 2 successors.");
+
//===----------------------------------------------------------------------===//
// Node auditing.
//===----------------------------------------------------------------------===//
assert (!V->isSink());
Preds.addNode(V, G);
V->Succs.addNode(this, G);
+ if (V->Succs.size() == 3)
+ NumNodesWithMoreThanTwoSucc++;
#ifndef NDEBUG
if (NodeAuditor) NodeAuditor->AddEdge(V, this);
#endif
# Get the constraints engine.
my $ConstraintsModel = $ENV{'CCC_ANALYZER_CONSTRAINTS_MODEL'};
+#Get the internal stats setting.
+my $InternalStats = $ENV{'CCC_ANALYZER_INTERNAL_STATS'};
+
# Get the output format.
my $OutputFormat = $ENV{'CCC_ANALYZER_OUTPUT_FORMAT'};
if (!defined $OutputFormat) { $OutputFormat = "html"; }
if (defined $ConstraintsModel) {
push @AnalyzeArgs, "-analyzer-constraints=$ConstraintsModel";
}
+
+ if (defined $InternalStats) {
+ push @AnalyzeArgs, "-analyzer-stats";
+ }
if (defined $Analyses) {
push @AnalyzeArgs, split '\s+', $Analyses;
-maxloop N - specifiy the number of times a block can be visited before giving
up. Default is 4. Increase for more comprehensive coverage at a
cost of speed.
-
+ -internal-stats - Generate internal analyzer statistics.
+
CONTROLLING CHECKERS:
A default group of checkers are always run unless explicitly disabled.
my @AnalysesToRun;
my $StoreModel;
my $ConstraintsModel;
+my $InternalStats;
my $OutputFormat = "html";
my $AnalyzerStats = 0;
my $MaxLoop = 0;
$ConstraintsModel = shift @ARGV;
next;
}
+
+ if ($arg eq "-internal-stats") {
+ shift @ARGV;
+ $InternalStats = 1;
+ next;
+ }
if ($arg eq "-plist") {
shift @ARGV;
if (defined $ConstraintsModel) {
$ENV{'CCC_ANALYZER_CONSTRAINTS_MODEL'} = $ConstraintsModel;
}
+if (defined $InternalStats) {
+ $ENV{'CCC_ANALYZER_INTERNAL_STATS'} = 1;
+}
if (defined $OutputFormat) {
$ENV{'CCC_ANALYZER_OUTPUT_FORMAT'} = $OutputFormat;
}