[llvm-bugs] [Bug 36625] New: clang-format rules should allow space before braced list.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 6 20:01:41 PST 2018


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

            Bug ID: 36625
           Summary: clang-format rules should allow space before braced
                    list.
           Product: clang
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ross.kirsling at sony.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

WebKit C++ style for object initialization* is as follows:

Foo foo { bar };

Yet using `clang-format -style=webkit` changes this to:

Foo foo{ bar };

In fact, there does not seem to be any combination of rules that will ensure a
space before a braced list in this fashion.

My colleagues and I are interested in making use of clang-format for WebKit
development, so resolving this discrepancy would be quite helpful!

-----

* This isn't spelled out in the style guide but here's an arbitrary example:
https://github.com/WebKit/webkit/blob/master/Source/WebCore/xml/XMLHttpRequest.h#L221-L222

-- 
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/20180307/0b4fa11b/attachment.html>


More information about the llvm-bugs mailing list