summaryrefslogtreecommitdiffstats
path: root/clang/Driver/clang.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-14 18:40:58 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-14 18:40:58 +0000
commit751d4d2d60596555c1ce7cd9e613a711bf9f5081 (patch)
treef7620503831a53c6b3266b6f7fc970b9adae82be /clang/Driver/clang.cpp
parent2cd8e38ab97d3ad17f9c0d589e5e0591c267cd5e (diff)
downloadbcm5719-llvm-751d4d2d60596555c1ce7cd9e613a711bf9f5081.tar.gz
bcm5719-llvm-751d4d2d60596555c1ce7cd9e613a711bf9f5081.zip
Added driver option "-checker-opt-analyze-headers" to force the static
analyzer to analyze functions declared in header files. llvm-svn: 49675
Diffstat (limited to 'clang/Driver/clang.cpp')
-rw-r--r--clang/Driver/clang.cpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp
index 098450d72d1..287ea9da9bb 100644
--- a/clang/Driver/clang.cpp
+++ b/clang/Driver/clang.cpp
@@ -146,21 +146,34 @@ static llvm::cl::opt<std::string>
OutputFile("o",
llvm::cl::value_desc("path"),
llvm::cl::desc("Specify output file (for --serialize, this is a directory)"));
-
+
+//===----------------------------------------------------------------------===//
+// Diagnostic Options
+//===----------------------------------------------------------------------===//
+
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"),
llvm::cl::value_desc("HTML directory"));
//===----------------------------------------------------------------------===//
+// Analyzer Options
+//===----------------------------------------------------------------------===//
+
+static llvm::cl::opt<bool>
+VisualizeEG("visualize-egraph",
+ llvm::cl::desc("Display static analysis Exploded Graph."));
+
+static llvm::cl::opt<bool>
+AnalyzeAll("checker-opt-analyze-headers",
+ llvm::cl::desc("Force the static analyzer to analyze "
+ "functions defined in header files."));
+
+//===----------------------------------------------------------------------===//
// Language Options
//===----------------------------------------------------------------------===//
@@ -1057,11 +1070,11 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile,
case AnalysisGRSimpleVals:
return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, OutputFile,
- VisualizeEG, TrimGraph);
+ VisualizeEG, TrimGraph, AnalyzeAll);
case CheckerCFRef:
return CreateCFRefChecker(Diag, AnalyzeSpecificFunction, OutputFile,
- VisualizeEG, TrimGraph);
+ VisualizeEG, TrimGraph, AnalyzeAll);
case TestSerialization:
return CreateSerializationTest(Diag, FileMgr, LangOpts);
OpenPOWER on IntegriCloud