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: unassignedclangb...@nondot.org
          Reporter: curde...@gmail.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to