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 1212#include " ../ClangTidyCheck.h"
1313#include " clang/ASTMatchers/ASTMatchFinder.h"
1414#include " clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h"
15- #include < optional>
1615
1716namespace clang ::tidy::bugprone {
1817
@@ -26,8 +25,7 @@ class UncheckedOptionalAccessCheck : public ClangTidyCheck {
2625public:
2726 UncheckedOptionalAccessCheck (StringRef Name, ClangTidyContext *Context)
2827 : ClangTidyCheck(Name, Context),
29- ModelOptions{
30- Options.getLocalOrGlobal (" IgnoreSmartPointerDereference" , false )} {}
28+ ModelOptions{Options.get (" IgnoreSmartPointerDereference" , false )} {}
3129 void registerMatchers (ast_matchers::MatchFinder *Finder) override ;
3230 void check (const ast_matchers::MatchFinder::MatchResult &Result) override ;
3331 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,
277277 ClangTidyContext *Context)
278278 : ClangTidyCheck(Name, Context),
279279 IgnoreArrays (Options.get(" IgnoreArrays" , false )),
280- UseAssignment(Options.getLocalOrGlobal (" UseAssignment" , false )) {}
280+ UseAssignment(Options.get (" UseAssignment" , false )) {}
281281
282282void ProTypeMemberInitCheck::registerMatchers (MatchFinder *Finder) {
283283 auto IsUserProvidedNonDelegatingConstructor =
Original file line number Diff line number Diff line change @@ -119,11 +119,10 @@ void RvalueReferenceParamNotMovedCheck::check(
119119RvalueReferenceParamNotMovedCheck::RvalueReferenceParamNotMovedCheck (
120120 StringRef Name, ClangTidyContext *Context)
121121 : 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 )),
125124 IgnoreNonDeducedTemplateTypes(
126- Options.getLocalOrGlobal (" IgnoreNonDeducedTemplateTypes" , false )) {}
125+ Options.get (" IgnoreNonDeducedTemplateTypes" , false )) {}
127126
128127void RvalueReferenceParamNotMovedCheck::storeOptions (
129128 ClangTidyOptions::OptionMap &Opts) {
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ InefficientVectorOperationCheck::InefficientVectorOperationCheck(
7777 : ClangTidyCheck(Name, Context),
7878 VectorLikeClasses (utils::options::parseStringList(
7979 Options.get(" VectorLikeClasses" , " ::std::vector" ))),
80- EnableProto(Options.getLocalOrGlobal (" EnableProto" , false )) {}
80+ EnableProto(Options.get (" EnableProto" , false )) {}
8181
8282void InefficientVectorOperationCheck::storeOptions (
8383 ClangTidyOptions::OptionMap &Opts) {
Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ class RedundantAccessSpecifiersCheck : public ClangTidyCheck {
2121public:
2222 RedundantAccessSpecifiersCheck (StringRef Name, ClangTidyContext *Context)
2323 : ClangTidyCheck(Name, Context),
24- CheckFirstDeclaration (
25- Options.getLocalOrGlobal(" CheckFirstDeclaration" , false )) {}
24+ CheckFirstDeclaration (Options.get(" CheckFirstDeclaration" , false )) {}
2625 bool isLanguageVersionSupported (const LangOptions &LangOpts) const override {
2726 return LangOpts.CPlusPlus ;
2827 }
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ RedundantCastingCheck::RedundantCastingCheck(StringRef Name,
9494 ClangTidyContext *Context)
9595 : ClangTidyCheck(Name, Context),
9696 IgnoreMacros (Options.getLocalOrGlobal(" IgnoreMacros" , true )),
97- IgnoreTypeAliases(Options.getLocalOrGlobal (" IgnoreTypeAliases" , false )) {}
97+ IgnoreTypeAliases(Options.get (" IgnoreTypeAliases" , false )) {}
9898
9999void RedundantCastingCheck::storeOptions (ClangTidyOptions::OptionMap &Opts) {
100100 Options.store (Opts, " IgnoreMacros" , IgnoreMacros);
Original file line number Diff line number Diff line change @@ -397,7 +397,7 @@ RenamerClangTidyCheck::RenamerClangTidyCheck(StringRef CheckName,
397397 ClangTidyContext *Context)
398398 : ClangTidyCheck(CheckName, Context),
399399 AggressiveDependentMemberLookup(
400- Options.getLocalOrGlobal (" AggressiveDependentMemberLookup" , false )) {}
400+ Options.get (" AggressiveDependentMemberLookup" , false )) {}
401401RenamerClangTidyCheck::~RenamerClangTidyCheck () = default ;
402402
403403void RenamerClangTidyCheck::storeOptions (ClangTidyOptions::OptionMap &Opts) {
You can’t perform that action at this time.
0 commit comments