summaryrefslogtreecommitdiffstats
path: root/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/AnalyzerOptions.h')
-rw-r--r--include/clang/StaticAnalyzer/Core/AnalyzerOptions.h81
1 files changed, 51 insertions, 30 deletions
diff --git a/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h b/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
index 7745e459e1..610b1201fd 100644
--- a/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
+++ b/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
@@ -1,9 +1,8 @@
//===- AnalyzerOptions.h - Analysis Engine Options --------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -198,6 +197,7 @@ public:
unsigned DisableAllChecks : 1;
unsigned ShowCheckerHelp : 1;
+ unsigned ShowCheckerHelpHidden : 1;
unsigned ShowEnabledCheckerList : 1;
unsigned ShowConfigOptionsList : 1;
unsigned ShouldEmitErrorsOnInvalidConfigValue : 1;
@@ -261,11 +261,12 @@ public:
AnalyzerOptions()
: DisableAllChecks(false), ShowCheckerHelp(false),
- ShowEnabledCheckerList(false), ShowConfigOptionsList(false),
- AnalyzeAll(false), AnalyzerDisplayProgress(false),
- AnalyzeNestedBlocks(false), eagerlyAssumeBinOpBifurcation(false),
- TrimGraph(false), visualizeExplodedGraphWithGraphViz(false),
- UnoptimizedCFG(false), PrintStats(false), NoRetryExhausted(false) {
+ ShowCheckerHelpHidden(false), ShowEnabledCheckerList(false),
+ ShowConfigOptionsList(false), AnalyzeAll(false),
+ AnalyzerDisplayProgress(false), AnalyzeNestedBlocks(false),
+ eagerlyAssumeBinOpBifurcation(false), TrimGraph(false),
+ visualizeExplodedGraphWithGraphViz(false), UnoptimizedCFG(false),
+ PrintStats(false), NoRetryExhausted(false) {
llvm::sort(AnalyzerConfigCmdFlags);
}
@@ -273,54 +274,74 @@ public:
/// interpreted as true and the "false" string is interpreted as false.
///
/// If an option value is not provided, returns the given \p DefaultVal.
- /// @param [in] Name Name for option to retrieve.
+ /// @param [in] CheckerName The *full name* of the checker. One may retrieve
+ /// this from the checker object's field \c Name, or through \c
+ /// CheckerManager::getCurrentCheckName within the checker's registry
+ /// function.
+ /// Checker options are retrieved in the following format:
+ /// `-analyzer-config CheckerName:OptionName=Value.
+ /// @param [in] OptionName Name for option to retrieve.
/// @param [in] DefaultVal Default value returned if no such option was
/// specified.
- /// @param [in] C The checker object the option belongs to. Checker options
- /// are retrieved in the following format:
- /// `-analyzer-config <package and checker name>:OptionName=Value.
/// @param [in] SearchInParents If set to true and the searched option was not
/// specified for the given checker the options for the parent packages will
/// be searched as well. The inner packages take precedence over the outer
/// ones.
- bool getCheckerBooleanOption(StringRef Name, bool DefaultVal,
- const ento::CheckerBase *C,
- bool SearchInParents = false) const;
+ bool getCheckerBooleanOption(StringRef CheckerName, StringRef OptionName,
+ bool DefaultVal,
+ bool SearchInParents = false) const;
+ bool getCheckerBooleanOption(const ento::CheckerBase *C, StringRef OptionName,
+ bool DefaultVal,
+ bool SearchInParents = false) const;
/// Interprets an option's string value as an integer value.
///
/// If an option value is not provided, returns the given \p DefaultVal.
- /// @param [in] Name Name for option to retrieve.
+ /// @param [in] CheckerName The *full name* of the checker. One may retrieve
+ /// this from the checker object's field \c Name, or through \c
+ /// CheckerManager::getCurrentCheckName within the checker's registry
+ /// function.
+ /// Checker options are retrieved in the following format:
+ /// `-analyzer-config CheckerName:OptionName=Value.
+ /// @param [in] OptionName Name for option to retrieve.
/// @param [in] DefaultVal Default value returned if no such option was
/// specified.
- /// @param [in] C The checker object the option belongs to. Checker options
- /// are retrieved in the following format:
- /// `-analyzer-config <package and checker name>:OptionName=Value.
/// @param [in] SearchInParents If set to true and the searched option was not
/// specified for the given checker the options for the parent packages will
/// be searched as well. The inner packages take precedence over the outer
/// ones.
- int getCheckerIntegerOption(StringRef Name, int DefaultVal,
- const ento::CheckerBase *C,
- bool SearchInParents = false) const;
+ int getCheckerIntegerOption(StringRef CheckerName, StringRef OptionName,
+ int DefaultVal,
+ bool SearchInParents = false) const;
+
+ int getCheckerIntegerOption(const ento::CheckerBase *C, StringRef OptionName,
+ int DefaultVal,
+ bool SearchInParents = false) const;
/// Query an option's string value.
///
/// If an option value is not provided, returns the given \p DefaultVal.
- /// @param [in] Name Name for option to retrieve.
+ /// @param [in] CheckerName The *full name* of the checker. One may retrieve
+ /// this from the checker object's field \c Name, or through \c
+ /// CheckerManager::getCurrentCheckName within the checker's registry
+ /// function.
+ /// Checker options are retrieved in the following format:
+ /// `-analyzer-config CheckerName:OptionName=Value.
+ /// @param [in] OptionName Name for option to retrieve.
/// @param [in] DefaultVal Default value returned if no such option was
/// specified.
- /// @param [in] C The checker object the option belongs to. Checker options
- /// are retrieved in the following format:
- /// `-analyzer-config <package and checker name>:OptionName=Value.
/// @param [in] SearchInParents If set to true and the searched option was not
/// specified for the given checker the options for the parent packages will
/// be searched as well. The inner packages take precedence over the outer
/// ones.
- StringRef getCheckerStringOption(StringRef Name, StringRef DefaultVal,
- const ento::CheckerBase *C,
- bool SearchInParents = false) const;
+ StringRef getCheckerStringOption(StringRef CheckerName, StringRef OptionName,
+ StringRef DefaultVal,
+ bool SearchInParents = false) const;
+
+ StringRef getCheckerStringOption(const ento::CheckerBase *C,
+ StringRef OptionName, StringRef DefaultVal,
+ bool SearchInParents = false) const;
/// Retrieves and sets the UserMode. This is a high-level option,
/// which is used to set other low-level options. It is not accessible