Skip to content

Commit 4f1ddf7

Browse files
committed
[CommandLine] Remove unused variable 'NearestHandler' (fixup for #74811)
Buildbots reported: .../CommandLine.cpp:1626:13: error: variable 'NearestHandler' set but not used [-Werror,-Wunused-but-set-variable]
1 parent 8abc80e commit 4f1ddf7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Support/CommandLine.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,6 @@ bool CommandLineParser::ParseCommandLineOptions(int argc,
16231623
bool DashDashFound = false; // Have we read '--'?
16241624
for (int i = FirstArg; i < argc; ++i) {
16251625
Option *Handler = nullptr;
1626-
Option *NearestHandler = nullptr;
16271626
std::string NearestHandlerString;
16281627
StringRef Value;
16291628
StringRef ArgName = "";
@@ -1703,8 +1702,7 @@ bool CommandLineParser::ParseCommandLineOptions(int argc,
17031702
// Otherwise, look for the closest available option to report to the user
17041703
// in the upcoming error.
17051704
if (!Handler && SinkOpts.empty())
1706-
NearestHandler =
1707-
LookupNearestOption(ArgName, OptionsMap, NearestHandlerString);
1705+
LookupNearestOption(ArgName, OptionsMap, NearestHandlerString);
17081706
}
17091707

17101708
if (!Handler) {

0 commit comments

Comments
 (0)