[llvm-bugs] [Bug 51728] New: Ability to customize indentation of designated initializers

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 2 19:34:06 PDT 2021


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

            Bug ID: 51728
           Summary: Ability to customize indentation of designated
                    initializers
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vlovich at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

When a designated initializer needs to spilled onto a new line, it uses
`ContinuationIndentWidth`. However in the KJ style guide
(https://github.com/capnproto/capnproto/blob/master/kjdoc/style-guide.md), such
a case should have `IndentWidth` applied.

Currently (undesirable):
IndentWidth: 2
ContinuationIndentWidth: 2

    return SomeStruct {
        .x = 5,
        .y = 6,
        .z = 7
    };

Desired:
IndentWidth: 2
ContinuationIndentWidth: 2

    return SomeStruct {
      .x = 5,
      .y = 6,
      .z = 7
    };

-- 
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/20210903/c6df3994/attachment-0001.html>


More information about the llvm-bugs mailing list