[llvm] [CommandLine] Better report unknown subcommands (PR #74811)

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 22:04:20 PST 2023


================
@@ -561,7 +565,19 @@ SubCommand *CommandLineParser::LookupSubCommand(StringRef Name) {
 
     if (StringRef(S->getName()) == StringRef(Name))
       return S;
+
+    unsigned Distance =
+        Name.edit_distance(S->getName(), /*AllowReplacements=*/true,
----------------
igorkudrin wrote:

Thanks. Fixed.

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


More information about the llvm-commits mailing list