http://bugs.llvm.org/show_bug.cgi?id=32684

            Bug ID: 32684
           Summary: [java] BraceWrapping: AfterFunction affects
                    synchronized blocks
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

It seems that synchronized blocks in Java are affected by BraceWrapping's
AfterFunction setting, rather than AfterControlStatement.

This config:

BreakBeforeBraces: Custom
BraceWrapping:
  AfterControlStatement: false
  AfterFunction: true

Results in this formatting:

class Foo {
  void bar()
  {
    synchronized (this)
    {
      System.out.println("");
      System.out.println("");
    }
  }
}

I would expect the { of the synchronized block to remain on the same line here.

clang-format version: 5.0.0 (1cd6beccb6bb876db3bbfa763e8979)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to