<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 - Using SortPriority split include groups (= includes with the same Priority field)"
   href="https://bugs.llvm.org/show_bug.cgi?id=46328">46328</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Using SortPriority split include groups (= includes with the same Priority field)
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.0
          </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>enhancement
          </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>laefy22@gmail.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>When using IncludeBlocks: Regroup, it seems SortPriority takes precedence over
Priority, which is counter intuitive: I wouldn't expect blocks to be split when
the includes have the same priority.

Exemple:

---------------------------
IncludeBlocks: Regroup
IncludeCategories:
  # G1
    - Regex:           'G1_1'
      Priority:        0
      SortPriority:    0

    - Regex:           'G1_2'
      Priority:        0
      SortPriority:    1

    - Regex:           'G1_3'
      Priority:        0
      SortPriority:    2

  # G2
    - Regex:           'G2'
      Priority:        1
---------------------------

gives the following output:
---------------------------
#include <G1_1.h>
#include <G1_2.h>

#include <G2.h>

#include <G1_3.h>
---------------------------

instead of:
---------------------------
#include <G1_1.h>
#include <G1_2.h>
#include <G1_3.h>

#include <G2.h>
---------------------------</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>