Skip to content

Commit 215e984

Browse files
localspookvarun-r-mallya
authored andcommitted
[clang-tidy][NFC] Remove unused parameter in function (#164202)
82289aa refactored this function to not need this parameter.
1 parent c7e9b3c commit 215e984

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clang-tools-extra/clang-tidy/ClangTidyCheck.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,10 @@ ClangTidyCheck::OptionsView::getLocalOrGlobal(StringRef LocalName) const {
9090
return std::nullopt;
9191
}
9292

93-
static std::optional<bool> getAsBool(StringRef Value,
94-
const llvm::Twine &LookupName) {
95-
93+
static std::optional<bool> getAsBool(StringRef Value) {
9694
if (std::optional<bool> Parsed = llvm::yaml::parseBool(Value))
9795
return Parsed;
98-
// To maintain backwards compatability, we support parsing numbers as
96+
// To maintain backwards compatibility, we support parsing numbers as
9997
// booleans, even though its not supported in YAML.
10098
long long Number = 0;
10199
if (!Value.getAsInteger(10, Number))
@@ -107,7 +105,7 @@ template <>
107105
std::optional<bool>
108106
ClangTidyCheck::OptionsView::get<bool>(StringRef LocalName) const {
109107
if (std::optional<StringRef> ValueOr = get(LocalName)) {
110-
if (auto Result = getAsBool(*ValueOr, NamePrefix + LocalName))
108+
if (auto Result = getAsBool(*ValueOr))
111109
return Result;
112110
diagnoseBadBooleanOption(NamePrefix + LocalName, *ValueOr);
113111
}
@@ -119,7 +117,7 @@ std::optional<bool>
119117
ClangTidyCheck::OptionsView::getLocalOrGlobal<bool>(StringRef LocalName) const {
120118
auto Iter = findPriorityOption(CheckOptions, NamePrefix, LocalName, Context);
121119
if (Iter != CheckOptions.end()) {
122-
if (auto Result = getAsBool(Iter->getValue().Value, Iter->getKey()))
120+
if (auto Result = getAsBool(Iter->getValue().Value))
123121
return Result;
124122
diagnoseBadBooleanOption(Iter->getKey(), Iter->getValue().Value);
125123
}

0 commit comments

Comments
 (0)