<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-6.0 ignores AlignConsecutiveDeclarations and AlignConsecutiveAssignments for section of code"
   href="https://bugs.llvm.org/show_bug.cgi?id=36722">36722</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format-6.0 ignores AlignConsecutiveDeclarations and AlignConsecutiveAssignments for section of code
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>llvm@derickrethans.nl
          </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=20058" name="attach_20058" title="Original file">attachment 20058</a> <a href="attachment.cgi?id=20058&action=edit" title="Original file">[details]</a></span>
Original file

The attached file "bson.c", when processed with the attached clang-format file
".clang-format", produces the following diff (also attached):

--- bson.c      2018-03-14 11:24:38.895642438 +0000
+++ bson.c.formatted    2018-03-14 11:24:49.051771534 +0000
@@ -29,13 +29,13 @@
 #else
        {
                HashPosition pos;
-               zval**       property;
+               zval** property;

                for (i = 0; i < 10; i++) {
-                       char*                         string_key     = NULL;
-                       uint                          string_key_len = 0;
-                       ulong                         num_key        = 0;
-                       zend_class_entry*             map_ce         = NULL;
+                       char* string_key = NULL;
+                       uint string_key_len = 0;
+                       ulong num_key = 0;
+                       zend_class_entry* map_ce = NULL;
                        php_phongo_bson_typemap_types map_type;
                }
        }


This only seems to happen due to some interaction with the code in the
php_phongo_bson_visit_binary function, and only for the #else block. If I
remove the surrounding { .. }, it works as expected. This is of course a
trimmed down version of the function.</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>