<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/106684>106684</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang] -Wpadded does not trigger any warnings, despite using same code as unit tests
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
carlosgalvezp
</td>
</tr>
</table>
<pre>
Hi,
I copy-pasted [this unit test](https://github.com/llvm/llvm-project/blob/ce7c828e085563f29451ec5fac9626c76ebf70ee/clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp#L9) into a standalone .cpp file, and enabled `-Weverything`. To my surprise, no warnings are generated. Why is that?
https://godbolt.org/z/sfPWqMv45
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkkGP2y4QxT8NvowcEWwc--DDbiL__5VaqYdK2esAY5uWgAs4VfbTV07a7qq3XpgDMzDvvR-mZCdP1DP5zOSpwDXPIfYaowtpQnel16VQwdz6_y0TR8ZPjD89zg-gw3IrF0yZDDD5nGebYPU2Q6aUmTwx0c45L4lVT0wMTAyTzfOqdjpcmBicu_4u5RLDV9KZiUG5oJgYNB10K1rirZRNNYqulnvSckTdNaLRh4bUeOBEW6tDPzEx3D8VwzEY-o_88eWFieEHRl-ic-WCxpApF9Tf3ooPvlyC2ellYaL62DHRgfU5AELK6A264Am2axitIyaOgN4AeVRuk9zw8kxXirc8Wz-xhu_gS4DLDdIal2jTfcIH2LawfkqAkWAiTxEzmR2c5xvYBHnGzKrhvbd_2RaMCi7vQtx0vjIxpPHz-funay0f7YXpK9NVHRbU7w9Cci67ui7mHmvV4njQHW8RKznqGo2q96puVGVUpwvbCy5q3lact_uO1ztO-lBxpfReC6Vly2pOF7Rut-W0bVDYlFbq97xp2rpwqMilOz1CPJKonozFyYeUrU5MiA2r2N9jVuuUWM2dTTm9PZhtdncAH_PyBOX5kReYQAl8yJCjnSaKgP72x87NXUNpsZlgTdZPkPBCoIMhwHckpmKNrv9nEu86ExPDL6nXXvwMAAD__-sVBoY">