aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 4c6a47c90d..08eef52acc 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -449,6 +449,14 @@ static void InitializeDiagnostics(Diagnostic &Diags) {
}
//===----------------------------------------------------------------------===//
+// Analysis-specific options.
+//===----------------------------------------------------------------------===//
+
+static llvm::cl::opt<std::string>
+AnalyzeSpecificFunction("analyze-function",
+ llvm::cl::desc("Run analysis on specific function."));
+
+//===----------------------------------------------------------------------===//
// Target Triple Processing.
//===----------------------------------------------------------------------===//
@@ -982,10 +990,10 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile,
return CreateUnitValsChecker(Diag);
case AnalysisGRSimpleVals:
- return CreateGRSimpleVals(Diag);
+ return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction);
case AnalysisGRSimpleValsView:
- return CreateGRSimpleVals(Diag, true);
+ return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, true);
case TestSerialization:
return CreateSerializationTest(Diag, FileMgr, LangOpts);