[llvm-bugs] [Bug 50460] New: extern with new line brace without indentation

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 25 03:03:42 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50460

            Bug ID: 50460
           Summary: extern with new line brace without indentation
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nn1436401 at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Seems like after fixing https://bugs.llvm.org/show_bug.cgi?id=33083 there is no
option to have the old formatting:

extern "C"
{
void f();
}


All permutations doesn't give the expected result.

1.
BreakBeforeBraces: Custom

BraceWrapping:
  AfterExternBlock: true

IndentExternBlock: AfterExternBlock

Result:
extern "C"
{
    void f() {}
}

2.
BreakBeforeBraces: Custom

BraceWrapping:
  AfterExternBlock: false

IndentExternBlock: AfterExternBlock

Result:
extern "C" {
void f() {}
}

3.
BreakBeforeBraces: Custom

BraceWrapping:
  AfterExternBlock: true

IndentExternBlock: NoIndent

Result:
extern "C" {
void f() {}
}


4.
BreakBeforeBraces: Custom

BraceWrapping:
  AfterExternBlock: true

IndentExternBlock: Indent

Result:
extern "C" {
    void f() {}
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210525/d2803391/attachment.html>


More information about the llvm-bugs mailing list