llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.08k stars 11.99k forks source link

clang::Decl::print #59823

Open xingyc0979 opened 1 year ago

xingyc0979 commented 1 year ago

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

llvmbot commented 1 year ago

@llvm/issue-subscribers-clang-frontend