From 2bdd77696e552f9188328e8645ce1319c83a42ed Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 7 Mar 2008 22:58:01 +0000 Subject: Added --trim-path-graph to the driver to trim paths from the ExplodedGraph that are not related to error nodes. Fixed bug where we did not detect some NULL dereferences. Added "ExplodedGraph::Trim" to trim all nodes that cannot transitively reach a set of provided nodes. Fixed subtle bug in ExplodedNodeImpl where we could create predecessor iterators that included the mangled "sink" bit. The better fix is to integrate this bit into the void* for the wrapped State, not the NodeGroups representing a node's predecessors and successors. llvm-svn: 48036 --- clang/Driver/clang.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'clang/Driver/clang.cpp') diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp index 216e669ccca..68070759129 100644 --- a/clang/Driver/clang.cpp +++ b/clang/Driver/clang.cpp @@ -461,6 +461,11 @@ static llvm::cl::opt AnalyzeSpecificFunction("analyze-function", llvm::cl::desc("Run analysis on specific function.")); +static llvm::cl::opt +TrimGraph("trim-path-graph", + llvm::cl::desc("Only show error-related paths in the analysis graph.")); + + //===----------------------------------------------------------------------===// // Target Triple Processing. //===----------------------------------------------------------------------===// @@ -1039,7 +1044,7 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile, return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction); case AnalysisGRSimpleValsView: - return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, true); + return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, true, TrimGraph); case CheckerCFRef: return CreateCFRefChecker(Diag, AnalyzeSpecificFunction); -- cgit v1.2.3