[PATCH] D116859: Fix for: clang-format: break added to macro define with ColumnLimit: 0

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 10 12:55:59 PST 2022


curdeius added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:4810-4811
+
+  verifyFormat("#define STRINGIFY(t) #t\n"
+               "#define MAKEVERSIONSTRING(x, y, z, build) STRINGIFY(x) \".\" STRINGIFY(y) \".\" STRINGIFY(z) \".\" STRINGIFY(build)\n",
+               ZeroColumn);
----------------
HazardyKnusperkeks wrote:
> curdeius wrote:
> > Please test with something simpler.
> Did this show the bugged behavior without the patch?
> 
> Regarding the `// clang-format off` there is the question what do we want in the tests? Show the long lines as the long lines, then we need to turn it off some times. Or do we want to keep the limit and break the strings, thus making it harder to read for the human?
> Did this show the bugged behavior without the patch?
Yes. I checked with a pretty fresh master.

> Regarding the `// clang-format off` there is the question what do we want in the tests? Show the long lines as the long lines, then we need to turn it off some times. Or do we want to keep the limit and break the strings, thus making it harder to read for the human?
I'm pretty much against adding `// clang-format off` too, it hurts more than it helps IMO.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116859



More information about the cfe-commits mailing list