[PATCH] D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 30 08:36:01 PST 2019


jhenderson added inline comments.


================
Comment at: unittests/Support/CommandLineTest.cpp:929-930
+  EXPECT_EQ(Output,
+            ("  -" + OptName + "         - " + HelpText + "\n  -" + OptName +
+             "=<value> - " + HelpText + "\n    =v1                -   desc1\n")
+                .str());
----------------
thopre wrote:
> jhenderson wrote:
> > thopre wrote:
> > > I think it's better to go to next line for every \n, I'd suggest also keeping the \n at end of line to make the reference string as close as the output. Likewise for other tests below and above.
> > That's what I wanted to do, but this is how clang-format lines it up. I'm happy to not run clang-format on this section, if you are.
> I'm quite new to the community so not sure how is it viewed to ignore clang-format. In my opinion formatting is to improve readability by consistency, in this case having things as close as possible to the output is more readable so I'd be in favour of ignoring clang-format just for that bit yes.
I'm okay with not using clang-format here, personally. I agree with your assessment that formatting the code via clang-format makes it worse.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57030





More information about the llvm-commits mailing list