<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 AlignOperands insufficient to describe all on one line or one line per"
   href="https://bugs.llvm.org/show_bug.cgi?id=33915">33915</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format AlignOperands insufficient to describe all on one line or one line per
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>4.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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>azy.development@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>AlignOperands enables alignment when items exceed the line character limit
however it doesn't sufficiently describe (and probably shouldn't conflate) the
one line for all or one line per item capability.

Example:

Unformatted (all on one line):

uint64_t foo = 1231123413 | 1231234123412341234123413241234123413 |
12312312312341234123413;


Formatted with ‘AlignOperands:   true’ (when exceeding line limit):

uint64_t foo = 1231123413 | 1231234123412341234123413241234123413
               | 12312312312341234123413;


Desired formatting (one line per only if exceeding line limit):

uint64_t foo = 1231123413
               | 1231234123412341234123413241234123413
               | 12312312312341234123413;

This should probably be a new config bool.

This is good for when working with binary ORs/ANDs/etc in embedded programming
where each line represents a specific bit that’s being set. This is all but
impossible to read without this feature especially when the bits being set are
computed at runtime with function calls and whatnot needed per bit.

PS. There is an additional config bit possible which forces all situations to
put everything on one line each but that's probably not that useful; unlikely
that folks would want every addition to be on 2 lines for example.</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>