[PATCH] D6833: Clang-format: Braces Indent Style Whitesmith

JVApen via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 12 10:54:09 PDT 2019


Hello Tim,

I am no longer working on this. I've spent my time convincing my colleagues
that clang-format is useful enough to change our braces, with success.

I remember also being stuck on the enumerations. Good luck!

On Wed, Jun 12, 2019, 04:16 Tim Wojtulewicz via Phabricator <
reviews at reviews.llvm.org> wrote:

> timwoj added a comment.
>
> I updated this patch to remove all of the code from `ContinuationIndenter`
> and to use the newer `BraceWrapping` style option instead of setting each
> one individually in `UnwrappedLineParser`.
>
> I still have the same issue with enums. Looking at the `RootToken` in
> `UnwrappedLineFormatter::formatFirstToken` when parsing an enum, the first
> pass through it has the entire line for the enum in it with all of the
> newlines stripped from my test case. It then doesn't ever return the braces
> as separate lines. If someone could give me a pointer as to how/why enums
> are tokenized differently from everything else, I can likely fix it. The
> test case I'm using looks like:
>
>   verifyFormat("enum X\n"
>                "  {\n"
>                "  Y = 0,\n"
>                "  }\n",
>                WhitesmithsBraceStyle);
>
> I also have the issue with a `break` after a block inside of a case
> statement, as mentioned in https://reviews.llvm.org/D6833#107539. Other
> than those two, it's mostly working correctly. I removed the test for
> lambdas because I'm not entirely sure how that should even be formatted
> with Whitesmiths, but I can add it back in again.
>
> Should I update this thread with the new diff against HEAD, or should I
> open a new one and close this one as dead?
>
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D6833/new/
>
> https://reviews.llvm.org/D6833
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190612/b8d16e3a/attachment.html>


More information about the cfe-commits mailing list