Open bcardosolopes opened 2 days ago
cc @ChuanqiXu9
Some detailed description:
In https://github.com/llvm/clangir/pull/1166, we disabled to check for the equality of array element types for the following issue:
In an array of unions (or types containing unions), we may construct an array attribute from the initializers. However, the type of the initializers may be different for unions. https://github.com/llvm/clangir/pull/1007 is another try to solve the problem but it shows it is not easy to fix it fundamentally without introducing two type systems: one for code gen for CIR and one for lowering CIR. See the comments in https://github.com/llvm/clangir/pull/1160#issuecomment-2499675263 for detailed analysis.
_Originally posted by @bcardosolopes in https://github.com/llvm/clangir/pull/1166#discussion_r1861314776_