diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-14 18:40:58 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-14 18:40:58 +0000 |
commit | 55af98c10a2fdff1fc2ee757746fdfb118d83eec (patch) | |
tree | c6ca117291ccc292cb03a22fb83da87a60b12163 /Driver/clang.cpp | |
parent | 1c86b156ff5b6e42319add892c0b18eb12f6b32b (diff) |
Added driver option "-checker-opt-analyze-headers" to force the static
analyzer to analyze functions declared in header files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r-- | Driver/clang.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp index 098450d72d..287ea9da9b 100644 --- a/Driver/clang.cpp +++ b/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); |