[llvm-bugs] [Bug 35514] New: brace-init member initializers in function-try-blocks are not formatted correctly

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 4 04:22:39 PST 2017


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

            Bug ID: 35514
           Summary: brace-init member initializers in function-try-blocks
                    are not formatted correctly
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.wagner at easymile.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Using the default style; observed with both 3.9 and 5.0.

Expected format:

- - -
Foo(int abc, int def) try : _abc(abc), _def{def}, _ghi{1} {
  callA();
  callB();
} catch (std::exception&) {
}
- - -

Actual format:

- - -
Foo(int abc, int def) try : _abc(abc), _def { def }
, _ghi{1} {
  callA();
  callB();
}
catch (std::exception&) {
}
- - -

Note that it doesn't happen when using "regular" member initializers:

- - -
Foo(int abc, int def) try : _abc(abc), _def(def), _ghi(1) {
  callA();
  callB();
} catch (std::exception&) {
}
- - -

-- 
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/20171204/383b33aa/attachment.html>


More information about the llvm-bugs mailing list