[llvm-bugs] [Bug 46927] New: BraceWrapping: AfterEnum is false, but it does not work

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 31 02:22:47 PDT 2020


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

            Bug ID: 46927
           Summary: BraceWrapping: AfterEnum is false, but it does not
                    work
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: seockho.kim at samsung.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Brace after enum is broken although BreakBeforeBraces=Attach or
AfterEnum=false.

Here is an code example.

typedef enum
{
    SVC_DMS = 0,
    SVC_SAR,
    SVC_MAX
} ServiceType;

typedef struct {
    EventType event;
    ServiceType service;
} Event;


and this is my .clang-format.

BraceWrapping:
  AfterCaseLabel:  false
  AfterClass:      false
  AfterControlStatement: Never
  AfterEnum:       false
  AfterFunction:   false
  AfterNamespace:  false
  AfterObjCDeclaration: false
  AfterStruct:     false
  AfterUnion:      false
  AfterExternBlock: false
  BeforeCatch:     false
  BeforeElse:      false
  BeforeLambdaBody: false
  BeforeWhile:     false
  IndentBraces:    false
  SplitEmptyFunction: true
  SplitEmptyRecord: true
  SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach

-- 
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/20200731/320add50/attachment.html>


More information about the llvm-bugs mailing list