<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-format doesn't respect BreakConstructorInitializers setting"
   href="https://bugs.llvm.org/show_bug.cgi?id=48253">48253</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format doesn't respect BreakConstructorInitializers setting
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Formatter
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>legalize@xmission.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24193" name="attach_24193" title=".clang-format">attachment 24193</a> <a href="attachment.cgi?id=24193&action=edit" title=".clang-format">[details]</a></span>
.clang-format

The "BeforeColon" setting of BreakConstructorInitializers is described in 11.0
documentation as inserting a line break before the colon of an
initializer list, but this isn't working.  Example transcript below.
Source code used in this test is on github at
<a href="https://github.com/legalizeadulthood/refactor-test-suite">https://github.com/legalizeadulthood/refactor-test-suite</a>
commit 1cf5c07c500907817caf769a612a67b744f76e5b

D:\legalize\refactor-test-suite\src\RefactorTest
<span class="quote">> clang-format --version</span >
clang-format version 11.0.0

D:\legalize\refactor-test-suite\src\RefactorTest
<span class="quote">> clang-format -i AddOverride.cpp</span >

D:\legalize\refactor-test-suite\src\RefactorTest
<span class="quote">> git diff AddOverride.cpp</span >
diff --git a/RefactorTest/AddOverride.cpp b/RefactorTest/AddOverride.cpp
index 998ac2c..8fb96e7 100644
--- a/RefactorTest/AddOverride.cpp
+++ b/RefactorTest/AddOverride.cpp
@@ -8,7 +8,9 @@
 class Interface
 {
 public:
-    virtual ~Interface() { }
+    virtual ~Interface()
+    {
+    }

     virtual void Method() = 0;

@@ -20,11 +22,13 @@ public:
 class Implementation : public Interface
 {
 public:
-    Implementation()
-        : value_(0)
-    { }
+    Implementation() : value_(0)
+    {
+    }

-    virtual ~Implementation() { }
+    virtual ~Implementation()
+    {
+    }

     // #TEST#: AO1 Add override
     virtual void Method()
@@ -56,13 +60,13 @@ private:
 class AbstractImplementation : public Interface
 {
 public:
-    AbstractImplementation()
-        : value_(0)
+    AbstractImplementation() : value_(0)
     {
     }

     virtual ~AbstractImplementation()
-    {}
+    {
+    }

     virtual int Getter() const override
     {
@@ -81,12 +85,13 @@ private:
 class DerivedImplementation : public AbstractImplementation
 {
 public:
-    DerivedImplementation()
-        : AbstractImplementation()
-    {}
+    DerivedImplementation() : AbstractImplementation()
+    {

D:\legalize\refactor-test-suite\src\RefactorTest
<span class="quote">> find "BreakConstructorInitializers" ..\.clang-format</span >

---------- ..\.CLANG-FORMAT
BreakConstructorInitializers: BeforeColon

D:\legalize\refactor-test-suite\src\RefactorTest
></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>