[llvm-bugs] [Bug 35386] New: clang-format breaks formatting when an attribute (C++17) precedes a variable initialized with braces

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 22 08:32:46 PST 2017


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

            Bug ID: 35386
           Summary: clang-format breaks formatting when an attribute
                    (C++17) precedes a variable initialized with braces
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: curdeius at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

The simple code:

```
    int i{};
    [[maybe_unused]] int i{};
    int i{1};
    [[maybe_unused]] int i{1};
```

gets formatted to:


```
    int i {};
    [[maybe_unused]] int i {};
    int i { 1 };
    [[maybe_unused]] int i { 1 };
```

Style: LLVM (or anything else actually).

clang-format built from trunk on 2017-11-22.

-- 
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/20171122/eea166df/attachment.html>


More information about the llvm-bugs mailing list