@@ -418,7 +418,7 @@ std::unique_ptr<Arg> OptTable::parseOneArgGrouped(InputArgList &Args,
418418
419419std::unique_ptr<Arg> OptTable::ParseOneArg (const ArgList &Args, unsigned &Index,
420420 Visibility VisibilityMask) const {
421- return internalParseOneArg (Args, Index, nullptr ,
421+ return internalParseOneArg (Args, Index, /* ActiveCommand= */ nullptr ,
422422 [VisibilityMask](const Option &Opt) {
423423 return !Opt.hasVisibilityFlag (VisibilityMask);
424424 });
@@ -428,7 +428,7 @@ std::unique_ptr<Arg> OptTable::ParseOneArg(const ArgList &Args, unsigned &Index,
428428 unsigned FlagsToInclude,
429429 unsigned FlagsToExclude) const {
430430 return internalParseOneArg (
431- Args, Index, nullptr ,
431+ Args, Index, /* ActiveCommand= */ nullptr ,
432432 [FlagsToInclude, FlagsToExclude](const Option &Opt) {
433433 if (FlagsToInclude && !Opt.hasFlag (FlagsToInclude))
434434 return true ;
@@ -766,7 +766,7 @@ void OptTable::printHelp(raw_ostream &OS, const char *Usage, const char *Title,
766766 bool ShowHidden = !(FlagsToExclude & HelpHidden);
767767 FlagsToExclude &= ~HelpHidden;
768768 return internalPrintHelp (
769- OS, Usage, Title, {}, ShowHidden, ShowAllAliases,
769+ OS, Usage, Title, /* Subcommand= */ {}, ShowHidden, ShowAllAliases,
770770 [FlagsToInclude, FlagsToExclude](const Info &CandidateInfo) {
771771 if (FlagsToInclude && !(CandidateInfo.Flags & FlagsToInclude))
772772 return true ;
@@ -800,7 +800,7 @@ void OptTable::internalPrintHelp(
800800 // This loop prints subcommands list and sets ActiveCommand to
801801 // TopLevelCommand while iterating over all commands.
802802 for (const auto &C : Commands) {
803- if (StringRef (C.Name ) == " TopLevelCommand " ) {
803+ if (StringRef (C.Name ) == opt::TopLevelCommandName ) {
804804 ActiveCommand = &C;
805805 continue ;
806806 }
0 commit comments