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:
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: