[llvm] [CommandLine][NFCI] Simplify enumerating subcommands of an option (PR #75679)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 13:16:37 PST 2023


================
@@ -175,6 +175,24 @@ class CommandLineParser {
                                StringRef Overview, raw_ostream *Errs = nullptr,
                                bool LongOptionsUseDoubleDash = false);
 
+  void forEachSubCommand(Option &Opt,
+                         std::function<void(SubCommand &)> Action) {
----------------
nikic wrote:

Please use function_ref instead of std::function here.

https://github.com/llvm/llvm-project/pull/75679


More information about the llvm-commits mailing list