aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-10 22:16:52 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-10 22:16:52 +0000
commitd71ed26dd80cdfebb5bb49000cce538e6c9a90e3 (patch)
treed0461c3b4ee87901490f935c38f35ce8c8e991cd /Driver/clang.cpp
parentebe457c3443af253bc14ae77c2013b088370a66b (diff)
Refactored all logic to run the GRSimpleVals and CFRef checker into a common
code path in the clang driver. Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 6c82f19572..4c8a3525c8 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -122,11 +122,9 @@ ProgAction(llvm::cl::desc("Choose output type:"), llvm::cl::ZeroOrMore,
"Flag warnings of stores to dead variables."),
clEnumValN(WarnUninitVals, "warn-uninit-values",
"Flag warnings of uses of unitialized variables."),
- clEnumValN(AnalysisGRSimpleVals, "grsimple",
+ clEnumValN(AnalysisGRSimpleVals, "checker-simple",
"Perform path-sensitive constant propagation."),
- clEnumValN(AnalysisGRSimpleValsView, "grsimple-view",
- "View results of path-sensitive constant propagation."),
- clEnumValN(CheckerCFRef, "check-cfref",
+ clEnumValN(CheckerCFRef, "checker-cfref",
"Run the Core Foundation reference count checker."),
clEnumValN(TestSerialization, "test-pickling",
"Run prototype serialization code."),
@@ -153,6 +151,10 @@ static llvm::cl::opt<bool>
VerifyDiagnostics("verify",
llvm::cl::desc("Verify emitted diagnostics and warnings."));
+static llvm::cl::opt<bool>
+VisualizeEG("visualize-egraph",
+ llvm::cl::desc("Display static analysis Exploded Graph."));
+
static llvm::cl::opt<std::string>
HTMLDiag("html-diags",
llvm::cl::desc("Generate HTML to report diagnostics"),
@@ -480,10 +482,9 @@ AnalyzeSpecificFunction("analyze-function",
llvm::cl::desc("Run analysis on specific function."));
static llvm::cl::opt<bool>
-TrimGraph("trim-path-graph",
+TrimGraph("trim-egraph",
llvm::cl::desc("Only show error-related paths in the analysis graph."));
-
//===----------------------------------------------------------------------===//
// Target Triple Processing.
//===----------------------------------------------------------------------===//
@@ -1052,14 +1053,12 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile,
return CreateUnitValsChecker(Diag);
case AnalysisGRSimpleVals:
- return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, OutputFile);
-
- case AnalysisGRSimpleValsView:
return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, OutputFile,
- true, TrimGraph);
+ VisualizeEG, TrimGraph);
case CheckerCFRef:
- return CreateCFRefChecker(Diag, AnalyzeSpecificFunction, OutputFile);
+ return CreateCFRefChecker(Diag, AnalyzeSpecificFunction, OutputFile,
+ VisualizeEG, TrimGraph);
case TestSerialization:
return CreateSerializationTest(Diag, FileMgr, LangOpts);