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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D6833: Clang-forma... Tim Wojtulewicz via Phabricator via cfe-commits

Reply via email to