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

    <tr>
        <th>Summary</th>
        <td>
            clang-format regression around class declarations with attributes
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

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

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

<pre>
    desired formatting:
```cpp
#define ABSL_ATTRIBUTE_TRIVIAL_ABI
#define ABSL_NULLABILITY_COMPATIBLE

class ABSL_ATTRIBUTE_TRIVIAL_ABI ABSL_NULLABILITY_COMPATIBLE
    ArenaSafeUniquePtr{};
```

actual formatting:
```cpp
#define ABSL_ATTRIBUTE_TRIVIAL_ABI
#define ABSL_NULLABILITY_COMPATIBLE

class ABSL_ATTRIBUTE_TRIVIAL_ABI
 ABSL_NULLABILITY_COMPATIBLE ArenaSafeUniquePtr {};
```

bisection points to https://github.com/llvm/llvm-project/pull/124891. it's similar to https://github.com/llvm/llvm-project/issues/124574 as we were putting class-name to its own line and now we're mixing it with attributes. I guess this is due to special casing `ClassHeadName` despite having a heuristic with false positives that determines it (e.g. in this case we're falsely treating `ABSL_ATTRIBUTE_TRIVIAL_ABI` as `ClassHeadName`).
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMVNGq20YQ_ZrVy3DFemVb9oMe5CSmBjcNiW-hT5fRaiRNu1qpO6vr5u_L2rdtaMMttC8BgRDMnDNnztGgCPeeqFKbgzJmupK3qIxRm7cZLnGYQvULthwsxayZ2s9VS8KBWuimMGKM7HtV1ErXaqvvj53n9GmKljr2BPXh0_mpvlw-ng6Pl3dPl4-nH0_1-ak-nP5Z9v7xfK4Pp_Pp8tPTmx--_1BfTofzu1Sna-tQ5BW0f0EAAKgDefyEHT16_nWhDzGo8qDKt6o4fKngzoc2Lui-PZ1JyysgXxEJr6hsWMhGnjzME_soECcYYpwlqTVHZY49x2FpcjuNyhyde_7j9TCH6WeyUZnjvDinzHFl1rv9KgeOypQCwiM7DP8JkUUWkjvmplwDClwJrhQI5uXmBtz29OBxpMTAUWC6enBpx-hb8NMVrqRMGQhG_i11cIQrxwEwxsDNEklyOEG_kAjEgQVYoF1ucDKTZXRgUVKn2uo3ie47wvY9jqS2GlqSmSPBgM-pBGGgJbBEtneWDp0QzJNw5GdKDBihpUhhZE-SplFmR3mfA_s7v0WhP4e-9bvPEANhfBnilVRsdVrSVwZVZp9nbVW0-2KPGVWrstiXu73Z6WyoVutypzdds7FbvSoL0ttNU-h2U6AuCqR9xpXRZqPNqlzp9U7rfF2gbna6LIuy6zq7V2tNI7LLk4P5FPrs5l21MuW61JnDhpy8XBfr0PcP9z_q5caE6uZ8s_Si1tqxRPkLKXJ0VH3ZBYH6QCIpsBimxbf3HEBL1mHAlGT5u8vZElz1fyJ4U_Jcmd8DAAD__xFfpXc">