lunasorcery added a comment. Looking at this again I think the change is flawed. The `InitialToken` is taken *after* the enum token, and additionally the invocation of `ShouldBreakBeforeBrace` is falling through to the `return false;` case every time. As such the call to `addUnwrappedLine()` is _always_ skipped. This removes the newline for both the Attach and Break styles - but the Break style is then fixed up by some code in `TokenAnnotator.cpp` that I don't fully understand, which adds the newline back in.
So this change _works_, but not quite for the right reasons. D106349 <https://reviews.llvm.org/D106349> appears to implement this in a slightly more correct manner, taking the `InitialToken` _before_ we've advanced past the enum token, and handling the enum case inside `ShouldBreakBeforeBrace`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99840/new/ https://reviews.llvm.org/D99840 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits