File tree Expand file tree Collapse file tree 7 files changed +9
-13
lines changed Expand file tree Collapse file tree 7 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 12
12
#include " ../ClangTidyCheck.h"
13
13
#include " clang/ASTMatchers/ASTMatchFinder.h"
14
14
#include " clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h"
15
- #include < optional>
16
15
17
16
namespace clang ::tidy::bugprone {
18
17
@@ -26,8 +25,7 @@ class UncheckedOptionalAccessCheck : public ClangTidyCheck {
26
25
public:
27
26
UncheckedOptionalAccessCheck (StringRef Name, ClangTidyContext *Context)
28
27
: ClangTidyCheck(Name, Context),
29
- ModelOptions{
30
- Options.getLocalOrGlobal (" IgnoreSmartPointerDereference" , false )} {}
28
+ ModelOptions{Options.get (" IgnoreSmartPointerDereference" , false )} {}
31
29
void registerMatchers (ast_matchers::MatchFinder *Finder) override ;
32
30
void check (const ast_matchers::MatchFinder::MatchResult &Result) override ;
33
31
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override {
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ ProTypeMemberInitCheck::ProTypeMemberInitCheck(StringRef Name,
277
277
ClangTidyContext *Context)
278
278
: ClangTidyCheck(Name, Context),
279
279
IgnoreArrays (Options.get(" IgnoreArrays" , false )),
280
- UseAssignment(Options.getLocalOrGlobal (" UseAssignment" , false )) {}
280
+ UseAssignment(Options.get (" UseAssignment" , false )) {}
281
281
282
282
void ProTypeMemberInitCheck::registerMatchers (MatchFinder *Finder) {
283
283
auto IsUserProvidedNonDelegatingConstructor =
Original file line number Diff line number Diff line change @@ -119,11 +119,10 @@ void RvalueReferenceParamNotMovedCheck::check(
119
119
RvalueReferenceParamNotMovedCheck::RvalueReferenceParamNotMovedCheck (
120
120
StringRef Name, ClangTidyContext *Context)
121
121
: ClangTidyCheck(Name, Context),
122
- AllowPartialMove (Options.getLocalOrGlobal(" AllowPartialMove" , false )),
123
- IgnoreUnnamedParams(
124
- Options.getLocalOrGlobal(" IgnoreUnnamedParams" , false )),
122
+ AllowPartialMove (Options.get(" AllowPartialMove" , false )),
123
+ IgnoreUnnamedParams(Options.get(" IgnoreUnnamedParams" , false )),
125
124
IgnoreNonDeducedTemplateTypes(
126
- Options.getLocalOrGlobal (" IgnoreNonDeducedTemplateTypes" , false )) {}
125
+ Options.get (" IgnoreNonDeducedTemplateTypes" , false )) {}
127
126
128
127
void RvalueReferenceParamNotMovedCheck::storeOptions (
129
128
ClangTidyOptions::OptionMap &Opts) {
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ InefficientVectorOperationCheck::InefficientVectorOperationCheck(
77
77
: ClangTidyCheck(Name, Context),
78
78
VectorLikeClasses (utils::options::parseStringList(
79
79
Options.get(" VectorLikeClasses" , " ::std::vector" ))),
80
- EnableProto(Options.getLocalOrGlobal (" EnableProto" , false )) {}
80
+ EnableProto(Options.get (" EnableProto" , false )) {}
81
81
82
82
void InefficientVectorOperationCheck::storeOptions (
83
83
ClangTidyOptions::OptionMap &Opts) {
Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ class RedundantAccessSpecifiersCheck : public ClangTidyCheck {
21
21
public:
22
22
RedundantAccessSpecifiersCheck (StringRef Name, ClangTidyContext *Context)
23
23
: ClangTidyCheck(Name, Context),
24
- CheckFirstDeclaration (
25
- Options.getLocalOrGlobal(" CheckFirstDeclaration" , false )) {}
24
+ CheckFirstDeclaration (Options.get(" CheckFirstDeclaration" , false )) {}
26
25
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override {
27
26
return LangOpts.CPlusPlus ;
28
27
}
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ RedundantCastingCheck::RedundantCastingCheck(StringRef Name,
94
94
ClangTidyContext *Context)
95
95
: ClangTidyCheck(Name, Context),
96
96
IgnoreMacros (Options.getLocalOrGlobal(" IgnoreMacros" , true )),
97
- IgnoreTypeAliases(Options.getLocalOrGlobal (" IgnoreTypeAliases" , false )) {}
97
+ IgnoreTypeAliases(Options.get (" IgnoreTypeAliases" , false )) {}
98
98
99
99
void RedundantCastingCheck::storeOptions (ClangTidyOptions::OptionMap &Opts) {
100
100
Options.store (Opts, " IgnoreMacros" , IgnoreMacros);
Original file line number Diff line number Diff line change @@ -397,7 +397,7 @@ RenamerClangTidyCheck::RenamerClangTidyCheck(StringRef CheckName,
397
397
ClangTidyContext *Context)
398
398
: ClangTidyCheck(CheckName, Context),
399
399
AggressiveDependentMemberLookup(
400
- Options.getLocalOrGlobal (" AggressiveDependentMemberLookup" , false )) {}
400
+ Options.get (" AggressiveDependentMemberLookup" , false )) {}
401
401
RenamerClangTidyCheck::~RenamerClangTidyCheck () = default ;
402
402
403
403
void RenamerClangTidyCheck::storeOptions (ClangTidyOptions::OptionMap &Opts) {
You can’t perform that action at this time.
0 commit comments