<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/61972>61972</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-format: aligning trailing comments in a block
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          alexolog
      </td>
    </tr>
</table>

<pre>
    I could find no way to tell clang-format to align trailing comments in a block when not every line in the block has a comment.

Example of desired alignment:
```cpp
#include <cmath>
#include <cassert>

int main()
{
    int a = 12 + 144 + 20; // A dozen, a gross, and a score
    a += 3 * sqrt(4);      // plus three times the square root of four
    a /= 7;                // divided by seven
    a += 5 * 11;           // plus five times eleven
    int b = pow(9, 2);
    assert(a == b + 0);    // is nine squared and not a bit more
}
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U91u8ygQfRp8M2qEwT_xhS-SppH2MTBMbHYxpICTZp9-BXabdlV9KALCDGcOx3NECHq0iD2pj6Q-FWKJk_O9MPjhjBuLwalH_xdItxgFF20VWAd38YDoIKIxII2w48vF-VnEdCiMHi1EL7TRdgTp5hltDKAtCBiMk__AfUIL1kXAG_oHGG0xheOEW8IkAojPqztCT4Qe1vntQ8xXg-AuoDBoj2otmBIJ35JIQ9efvF63E8a1lWZRCIS_ylnEifC3X2MiBPTxGc2zthFmoS1he8K6LdIe1w0AQEoQQPgJSgaEHaGsqrwySvgRCDsTdoYDKPcvWsJeQcDoXQh5axUICNJ5fAKKdDvhcSDsAOHdR8L2VarOj5DHBno1S4A4eUSIesaQdQzvi_AI3rmYtLq4xf_EPifs9gvrOTZUpW9aoYLhAQFvaH9hVmdmZfkT5Duri759kkLzEyUJNmTBru5O2L5LSrD1ed9qrR-D7bO2KXvIqtKnDls9HcCmPlofrrKoqcUEDDrC_KUtaU__a5L1b6F6rjreiQL7stnTtm46XhZTr1pVUblvG0QUsm7UXvKmU3WjpOzqQRa6Z5RxWtGGVnXNyx1rpKqruq5aKtml7khFcRba7Iy5zTvnx0KHsGDflF3LCiMGNCHbjzGLd8hBwlhyo-_TnZdhGQOpqNEhhidK1NFg_91_hB9WOyTn_cmCxeJNP8V4Dck0WcFRx2kZdtLNhJ1TjW15uXr3N8pI2DkzC4SdM_P_AgAA__8-3j3m">