<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/86855>86855</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Anonymous struct construct causes a Clang front-end assertion.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dgilmore83
</td>
</tr>
</table>
<pre>
A ToT "asserts" build of Clang in the following test case that uses the anonymous struct construct. I attached the test case per the "HowToSubmitABug" instructions:
[anon-6e7926.cpp.txt](https://github.com/llvm/llvm-project/files/14780063/anon-6e7926.cpp.txt)
[anon-6e7926.sh.txt](https://github.com/llvm/llvm-project/files/14780067/anon-6e7926.sh.txt)
The assertion message is:
clang++: /tmp/dgilmore/tt/clang/lib/CodeGen/CGExprAgg.cpp:1751: void {anonymous}::AggExprEmitter::VisitCXXParenListOrInitListExpr(clang::Expr*, llvm::ArrayRef<clang::Expr*>, clang::FieldDecl*, clang::Expr*): Assertion `(Field->isUnnamedBitfield() || Field->isAnonymousStructOrUnion()) && "Only unnamed bitfields or ananymous class allowed"' failed.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVE2PpDYQ_TXFxRoE5ebrwIHuHjYrRZooOxvt1UBBOzJ2yza7O_8-spv5UNQ5RFoJgVU8v2e_-hDOyUUTtVAcoTgnYvMXY9tpkWo1lmqeDGZ6aTv2bJ4ZIArnyHoHiGzYpJqYmdlJCb0wqZm_EJuNUuaH1Avz5DwbhSPmL8KzzZGLCKGNflnN5pjzdhs9G42-rVLGPjPhvRgvNEXsO8eVbIwA4m_mx7P5sg2r9N1xW8JZ5M4gjXbAO8jOkHVQHIPWQ0lVg2U6Xq-p_-mhOAPWF--vEYk9YL9If9mGdDQrYK_U99fPw9Wav2n0gP0sFTnAPj9UdZaVHLC_R47NXW13-XXS1b-kd-435fh-DkbHXEmj2UrOiYWYfDdnDEkDPIaHdwyw9-sVsH_NfAgE8R3XKzkA9icz0SfSYfXp8efVdssSrg68y6siD0TfjZwYVMe3LEN1DqK865YlbHlcpfdkb7G_pJP-9O3bH8KS_l06_2Q_a-nDKmAB65t-BN8iHeCJRaNurNaKlz9pBn66A-WPAf3hRy9JTWca1U50j74J9-jezIMyA6zjxgfgj9J91VqsNB2ln0MQsAZsGFQnqE7sA657teBLrM0n-1VLo2_wuANLwDJU9JNWL2y70bJh53XMWCa02JtlVMI5JkJ30QSIgBWbhVQ0pR8Tn0wtnxreiITavMrzoix5UySXtixpqHkx5Vle8pFX9TTUgouZHwTyIm8S2WKGh4xjlTdZyYu0mcuqKMshy7MpOwwZHDJahVRpcD81dkmkcxu1dVkXRaLEQMrFOYK4Vw2GkWLbWM_Dtjg4ZEo6794ZvPSK2u4_RwIbRRwcYp8yszXaP5Ce3qs7TTar2v_dVfHsoa3i8f8JAAD__2hVmL0">