[clang-format] Fix `BraceWrapping: AfterFunction` affecting synchronized blocks in Java.
Fixes https://github.com/llvm/llvm-project/issues/32031. Before this change, BraceWrapping: AfterFunction would affect synchronized blocks in Java, but they should be formatted w.r.t. BraceWrapping: AfterControlStatement. Using the config: ``` BreakBeforeBraces: Custom BraceWrapping: AfterControlStatement: false AfterFunction: true ``` would result in misformatted code like: ``` class Foo { void bar() { synchronized (this) { a(); a(); } } } ``` instead of: ``` class Foo { void bar() { synchronized (this) { a(); a(); } } } ``` Reviewed By: MyDeveloperDay, owenpan Differential Revision: https://reviews.llvm.org/D116767
Loading
Please sign in to comment