<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98365>98365</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang] Segfault with `-module-file-info`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chestnykh
</td>
</tr>
</table>
<pre>
If clang is invoked with `-module-file-info` and the file is of incorrect type then clang segfaults.
There is assert in the code
`assert(isCurrentFileAST() && "dumping non-AST?");`
Should this behavior be fixed or left unchanged?
CC: @AaronBallman @cor3ntin @Endilll
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8ks2O4yoQhZ-mvEGJoIhJvPAi3bmW7rr7BTCUDdMYIsCZ6bcf2Yk0s5oNf1Xn06GqdCl-jkQ9tG_Q3hq9VpdybxyVGr-_XDMm-93_PzETdJyZL8zHR_oiy3766hgofliSXQMdJh_o4OOUQHGmo2XVEdseN1GamI8m5Uymsvp9py0aX9BC86TXUMsR-A349bl-Osq7VpdCuTIfd6JJll5pij9DgBdf3tecKdbBB7p-fAJeADsGqAAVA0S7LncfZxZTPGxxOQAiYAfyDRR_Aj9cWsPm2xc2ktMPnzIbt0_8IstSZoGmytZonI4z2Y3xl9_3d5BXBid-1TnFNx3CouN2NynLWP1-_i9aH0Jgje2l7WSnG-rFGbmSbdti43ojNOKkNHVSobDnlhuh5Vmrk7lM0mDje-R44mfBxUV0QhzPHbcokKMahRnFBCdOi_bhGMJjOaY8N76UlfruIlXbBD1SKHu3Effyb3Vob03ut_zDuM4FTjz4UssfQvU17CPyVLQ39vHq2T_HoFlz6F2t9wLyCjgADrOvbh2PJi2Aw8Z_bYd7Tj_IVMBht1sAh6fjR4-_AwAA___9iNVS">