diff options
author | Anna Zaks <ganna@apple.com> | 2013-01-24 23:15:34 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-01-24 23:15:34 +0000 |
commit | d130140cb7bce73b4350c5d50495443abe38418a (patch) | |
tree | 84d15da403d4d68b59e0caaed7e7370e8ddba928 /include/clang/StaticAnalyzer/Core/AnalyzerOptions.h | |
parent | bfa9ab8183e2fdc74f8633d758cb0c6201314320 (diff) |
[analyzer] Add "-analyzer-config mode=[deep|shallow] ".
The idea is to introduce a higher level "user mode" option for
different use scenarios. For example, if one wants to run the analyzer
for a small project each time the code is built, they would use
the "shallow" mode.
The user mode option will influence the default settings for the
lower-level analyzer options. For now, this just influences the ipa
modes, but we plan to find more optimal settings for them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/AnalyzerOptions.h')
-rw-r--r-- | include/clang/StaticAnalyzer/Core/AnalyzerOptions.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h b/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h index aba4388ffd..c52e39cae8 100644 --- a/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h +++ b/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h @@ -105,8 +105,7 @@ enum IPAKind { /// Inline C functions and blocks when their definitions are available. IPAK_BasicInlining = 2, - /// Inline callees when their definitions are available. - // TODO: How is this different from BasicInlining? + /// Inline callees(C, C++, ObjC) when their definitions are available. IPAK_Inlining = 3, /// Enable inlining of dynamically dispatched methods. @@ -176,6 +175,20 @@ public: AnalysisInliningMode InliningMode; private: + /// \brief Describes the kinds for high-level analyzer mode. + enum UserModeKind { + UMK_NotSet = 0, + /// Perform shallow but fast analyzes. + UMK_Shallow = 1, + /// Perform deep analyzes. + UMK_Deep = 2 + }; + + /// Controls the high-level analyzer mode, which influences the default + /// settings for some of the lower-level config options (such as IPAMode). + /// \sa getUserMode + UserModeKind UserMode; + /// Controls the mode of inter-procedural analysis. IPAKind IPAMode; @@ -224,6 +237,11 @@ private: int getOptionAsInteger(StringRef Name, int DefaultVal); public: + /// \brief Retrieves and sets the UserMode. This is a high-level option, + /// which is used to set other low-level options. It is not accessible + /// outside of AnalyzerOptions. + UserModeKind getUserMode(); + /// \brief Returns the inter-procedural analysis mode. IPAKind getIPAMode(); |