[PATCH] D91970: [lld/mac] Implement basic typo correction for flags

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 24 08:29:34 PST 2020


hans accepted this revision.
hans added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lld/MachO/DriverUtils.cpp:78
 
-  for (opt::Arg *arg : args.filtered(OPT_UNKNOWN))
-    error("unknown argument: " + arg->getSpelling());
+  for (auto *arg : args.filtered(OPT_UNKNOWN)) {
+    std::string nearest;
----------------
i probably would have kept opt::Arg here, but i guess it's a personal preference


================
Comment at: lld/test/MachO/driver.test:1
+# RUN: not %lld ---help 2>&1 | FileCheck -check-prefix=SPELLHELP %s
+SPELLHELP: error: unknown argument '---help', did you mean '--help'
----------------
nit: blank line after run line is common (or am i just imagining this?)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91970/new/

https://reviews.llvm.org/D91970



More information about the llvm-commits mailing list