<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64165>64165</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang][ASTImporter] Decls within declcontext not in lexical order
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
danix800
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
danix800
</td>
</tr>
</table>
<pre>
Revision https://reviews.llvm.org/D154764 is still not complete. An extra reordering is needed for lexical order of all imported decls within a record. The final algorithm could be summarized as the following:
1. Import all fields that'll be part of the layout;
1. Sort these fields to ensure correct layout;
1. Import everything else;
1. Final re-ordering by lexical order.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUs2OpDwMfJpwsQZBmr8-cJhRC-m7fjMvEBIDXpmklYT-2adfhe3tnZb2AlLscrnKpUKg2SL2ov4QUhpl6dYVhZBS1KdMbXFxvv_zmo3O3Pv_8UKBnIUlxnMQh3chByEHjxfCa8iZL2vu_CzkcCrrqm0qoAAhEjNYF0G79cwYMYd3C3iLXoFH5w16snNqtYgGDUzOA-ONtGLYy-AmUMxA69n5iAYMag5wpbiQhTRFO29y-FoQJrKKQfHsPMVlBe02NjAihG1dlaefaEAFiKnVMbsr2TkpKU6ieHzLHP7bmXbSiZBNAqgoZMucZp2Vj2mpNIXV3W1RHD6e4M8EjQsGfIIdoA2bR9DOe9TxH6gHJV7Q35OuGZADfu8Ydmke356ejfdXo_LM9AdzPBxVhn3ZHIuqK7uizZZ-bFWlZafLqimarqtb1HKs1dTpQh3Voc2ol4U8FK1sy65sqjY3pZRKyVGWU1kdZSWqAldF_DxzRiFs2DdV2dQZqxE5PLJk8Qp78REm3yfM27jNQVQFU4h_w5JFiryHULOys6hPov54__z6bQd6UZ_g9P3c6fba2Yi3uKeK7KsH2ea5fw3oTHHZxly7VcghET9-b2fvfqCOQg77ukHIYZfzKwAA__-HUQcs">