[PATCH] D69501: [CommandLine] Add inline ArgName printing

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 08:07:28 PDT 2019


jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.

Aside from one formatting nit, this looks good to me. Please let @hintonda provide any more comments though before this gets committed.



================
Comment at: llvm/lib/Support/CommandLine.cpp:1456
           *Errs << ProgramName << ": Did you mean '"
-                << PrintArg(NearestHandlerString) << "'?\n";
+                << PrintArg(NearestHandlerString, 0) << "'?\n";
         }
----------------
jhenderson wrote:
> You should have a test for this change too, if feasible.
As an aside, once you've addressed a review comment, it's helpful if you select the "Done" button for each of those comments. You can do this prior to uploading the diff and they will get submitted when you upload too.


================
Comment at: llvm/unittests/Support/CommandLineTest.cpp:1700
+  OS.flush();
+  EXPECT_FALSE(Errs.find("prog: Did you mean '--aluminium'?\n") == std::string::npos);
+  Errs.clear();
----------------
Did you remember to run clang-format?


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

https://reviews.llvm.org/D69501





More information about the llvm-commits mailing list