Lines Matching defs:SC
181 for (auto *SC : RegisteredSubCommands)
182 Action(*SC);
186 for (auto *SC : Opt.Subs) {
187 assert(SC != &SubCommand::getAll() &&
189 Action(*SC);
193 void addLiteralOption(Option &Opt, SubCommand *SC, StringRef Name) {
196 if (!SC->OptionsMap.insert(std::make_pair(Name, &Opt)).second) {
205 Opt, [&](SubCommand &SC) { addLiteralOption(Opt, &SC, Name); });
208 void addOption(Option *O, SubCommand *SC) {
212 if (O->isDefaultOption() && SC->OptionsMap.contains(O->ArgStr))
216 if (!SC->OptionsMap.insert(std::make_pair(O->ArgStr, O)).second) {
225 SC->PositionalOpts.push_back(O);
227 SC->SinkOpts.push_back(O);
229 if (SC->ConsumeAfterOpt) {
233 SC->ConsumeAfterOpt = O;
249 forEachSubCommand(*O, [&](SubCommand &SC) { addOption(O, &SC); });
252 void removeOption(Option *O, SubCommand *SC) {
258 SubCommand &Sub = *SC;
286 forEachSubCommand(*O, [&](SubCommand &SC) { removeOption(O, &SC); });
311 void updateArgStr(Option *O, StringRef NewName, SubCommand *SC) {
312 SubCommand &Sub = *SC;
323 [&](SubCommand &SC) { updateArgStr(O, NewName, &SC); });
1460 for (auto *SC : RegisteredSubCommands) {
1461 for (auto &O : SC->OptionsMap)
1463 for (Option *O : SC->PositionalOpts)
1465 for (Option *O : SC->SinkOpts)
1467 if (SC->ConsumeAfterOpt)
1468 SC->ConsumeAfterOpt->reset();