[clang-tidy] Use getLocalOrGlobal for the StrictMode option

llvm-svn: 304154
This commit is contained in:
Alexander Kornienko 2017-05-29 13:59:27 +00:00
parent 51152a3727
commit 0055d97d4b
2 changed files with 4 additions and 2 deletions

View File

@ -108,7 +108,8 @@ static bool isPossiblyBitMask(const EnumDecl *EnumDec) {
SuspiciousEnumUsageCheck::SuspiciousEnumUsageCheck(StringRef Name,
ClangTidyContext *Context)
: ClangTidyCheck(Name, Context), StrictMode(Options.get("StrictMode", 0)) {}
: ClangTidyCheck(Name, Context),
StrictMode(Options.getLocalOrGlobal("StrictMode", 0)) {}
void SuspiciousEnumUsageCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "StrictMode", StrictMode);

View File

@ -24,7 +24,8 @@ void InefficientStringConcatenationCheck::storeOptions(
InefficientStringConcatenationCheck::InefficientStringConcatenationCheck(
StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context), StrictMode(Options.get("StrictMode", 0)) {}
: ClangTidyCheck(Name, Context),
StrictMode(Options.getLocalOrGlobal("StrictMode", 0)) {}
void InefficientStringConcatenationCheck::registerMatchers(
MatchFinder *Finder) {