[llvm-bugs] [Bug 26250] New: BreakConstructorInitializersBeforeComma problem with noexcept

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 22 00:59:51 PST 2016


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

            Bug ID: 26250
           Summary: BreakConstructorInitializersBeforeComma problem with
                    noexcept
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: alessandro.pezzato at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15688
  --> https://llvm.org/bugs/attachment.cgi?id=15688&action=edit
clang-format configuration

When constructor has noexcept operator, formatting doesn't follow the
"BreakConstructorInitializersBeforeComma: true" rule.
My .clang-format is attached

Expected:

Fooxxxxxxxxxxxxxxxxxxxxxx::Fooxxxxxxxxxxxxxxxxxxxxxx(
    int ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
noexcept
    : aaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{0}
    , bbbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{1}
    , cccxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{2} {
}

Actual:

Fooxxxxxxxxxxxxxxxxxxxxxx::Fooxxxxxxxxxxxxxxxxxxxxxx(
    int ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
noexcept
    : aaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{0},
      bbbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{1},
      cccxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{2} {
}

Without noexcept:

Fooxxxxxxxxxxxxxxxxxxxxxx::Fooxxxxxxxxxxxxxxxxxxxxxx(
    int ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
    : aaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{0}
    , bbbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{1}
    , cccxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{2} {
}

-- 
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/20160122/a14ff9d0/attachment-0001.html>


More information about the llvm-bugs mailing list