diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-25 00:09:51 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-25 00:09:51 +0000 |
commit | 116f3640daee424dfcdbe55e80be5a67476be4b0 (patch) | |
tree | 299acef14e4655362f44ba18e259e2ae5e086e35 /include | |
parent | 10aad449dfbb5b43611d45b99c88dfc26db7fac9 (diff) |
Intoduce '-analyzer-checker-help' flag which outputs a list of all available static analyzer checkers.
This is pretty basic for now, eventually checkers should be grouped according to package, hidden checkers should be indicated etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Driver/CC1Options.td | 3 | ||||
-rw-r--r-- | include/clang/Frontend/AnalyzerOptions.h | 2 | ||||
-rw-r--r-- | include/clang/StaticAnalyzer/Core/CheckerProvider.h | 5 | ||||
-rw-r--r-- | include/clang/StaticAnalyzer/Frontend/FrontendActions.h | 2 |
4 files changed, 12 insertions, 0 deletions
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 6cb85a3d4e..748e6cf326 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -105,6 +105,9 @@ def analyzer_disable_checker : Separate<"-analyzer-disable-checker">, def analyzer_disable_checker_EQ : Joined<"-analyzer-disable-checker=">, Alias<analyzer_disable_checker>; +def analyzer_checker_help : Flag<"-analyzer-checker-help">, + HelpText<"Display the list of analyzer checkers that are available">; + //===----------------------------------------------------------------------===// // CodeGen Options //===----------------------------------------------------------------------===// diff --git a/include/clang/Frontend/AnalyzerOptions.h b/include/clang/Frontend/AnalyzerOptions.h index 4b31e1e065..64263c1b54 100644 --- a/include/clang/Frontend/AnalyzerOptions.h +++ b/include/clang/Frontend/AnalyzerOptions.h @@ -64,6 +64,7 @@ public: std::string AnalyzeSpecificFunction; unsigned MaxNodes; unsigned MaxLoop; + unsigned ShowCheckerHelp : 1; unsigned AnalyzeAll : 1; unsigned AnalyzerDisplayProgress : 1; unsigned AnalyzeNestedBlocks : 1; @@ -86,6 +87,7 @@ public: AnalysisStoreOpt = BasicStoreModel; AnalysisConstraintsOpt = RangeConstraintsModel; AnalysisDiagOpt = PD_HTML; + ShowCheckerHelp = 0; AnalyzeAll = 0; AnalyzerDisplayProgress = 0; AnalyzeNestedBlocks = 0; diff --git a/include/clang/StaticAnalyzer/Core/CheckerProvider.h b/include/clang/StaticAnalyzer/Core/CheckerProvider.h index 414ad92b2a..40b838e758 100644 --- a/include/clang/StaticAnalyzer/Core/CheckerProvider.h +++ b/include/clang/StaticAnalyzer/Core/CheckerProvider.h @@ -17,6 +17,10 @@ #include "llvm/ADT/StringRef.h" #include <vector> +namespace llvm { + class raw_ostream; +} + namespace clang { namespace ento { @@ -45,6 +49,7 @@ public: virtual ~CheckerProvider(); virtual void registerCheckers(CheckerManager &checkerMgr, CheckerOptInfo *checkOpts, unsigned numCheckOpts) = 0; + virtual void printHelp(llvm::raw_ostream &OS) = 0; }; } // end ento namespace diff --git a/include/clang/StaticAnalyzer/Frontend/FrontendActions.h b/include/clang/StaticAnalyzer/Frontend/FrontendActions.h index e3867a2a24..f014181752 100644 --- a/include/clang/StaticAnalyzer/Frontend/FrontendActions.h +++ b/include/clang/StaticAnalyzer/Frontend/FrontendActions.h @@ -26,6 +26,8 @@ protected: llvm::StringRef InFile); }; +void printCheckerHelp(llvm::raw_ostream &OS); + } // end GR namespace } // end namespace clang |