File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -756,11 +756,12 @@ void OptTable::internalPrintHelp(
756756 // pairs.
757757 std::map<std::string, std::vector<OptionInfo>> GroupedOptionHelp;
758758
759- const auto ActiveSubCommand =
759+ typename ArrayRef<OptTable::SubCommand>::iterator ActiveSubCommand =
760760 std::find_if (SubCommands.begin (), SubCommands.end (),
761761 [&](const auto &C) { return SubCommand == C.Name ; });
762762 if (!SubCommand.empty ()) {
763- assert (ActiveSubCommand != nullptr && " Not a valid registered subcommand." );
763+ assert (ActiveSubCommand != SubCommands.end () &&
764+ " Not a valid registered subcommand." );
764765 OS << ActiveSubCommand->HelpText << " \n\n " ;
765766 if (!StringRef (ActiveSubCommand->Usage ).empty ())
766767 OS << " USAGE: " << ActiveSubCommand->Usage << " \n\n " ;
You can’t perform that action at this time.
0 commit comments