<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59823>59823</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang::Decl::print
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
xingyc0979
</td>
</tr>
</table>
<pre>
When the clang:: Decl:: print interface in Clang-15.02 involves the following code, it will output redundant embedded union structures, resulting in unknown errors.
input code:
union { int buf[((sizeof(union
{ typeof(struct editorConfig) a;
typeof(struct editorConfig) b; }))) ];
} control;
output:
union {
union {
typeof(struct editorConfig) a;
typeof(struct editorConfig) b;
};
int buf[152];
} control;
the ast of input code is as following:

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU9uOozgQ_RrzUgKZAnN54CHpKL-wz2AK4l3HjnzpbO_Xr0wyTac10sxYSKCqOqfqHFyj92o1RAMTRyZO2RjDxbrhX2XWD8n7ts8mO38Mf13IQLgQSD2alVUHVh3gRFI_P29OmQDKBHLLKAmUgbdUmZei4AigzLvV7-Q3jsVqbe_KrCDtTAzfQAW4K63BxnCLARzN0cyjCUDXieaZZohGWQM-uChDdOQTypGPOiQeZSCaf4y9GyDnrPMF4yfGD8okuq1LdXiEAOBJxtpjmhimuCTx2DHsvPqP7MKw20p2xI-TMOHj9qh5TAM0q2DdmzWLWhn2MLLq-ET-qnRi1RFYe2LYPx5g4rTDny1PIK0JzurPzMOnF027qNepv4f_YPov53eEvKKSqu-x3e1S4HelP9OZbsvoA9gF9l8JysPo91v0aQPDkomjuo4rJXLsLiHcfErjmeE5enL5lvXFqsIlTimSWpIJhbRXhucaO960omF4xpILbDvR5LNoG6yQ8qmvZV4LLvJO1ks-lW3ddnJqRlqKm0lGPAbJ5qGa-6ofMxrKpsUORcv77DIIOdWyn7pKcNHWgmpRiqXtBMq-q6qmzNSAHCte8pr3dYdd0VcNIheLaOupnnnFak7XUelC6_drYd2aKe8jDaLvsMr0OJH22y4jGrrDlmSYzM7ckDD5FFfPaq6VD35nCSpoGr5s977c225n0enh1c-Hh0_jEtHzld-c_ZtkYHje2nuG5228_wMAAP__ygBS6A">