[clang] [X86_32][C++] fix 0 sized struct case in vaarg. (PR #86388)

2024-07-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: There are two ways we could analyze, this, I think: - EmitVAArg is doing something which disagrees with the classification done by classifyArgumentType, so that's a bug in EmitVAArg. - classifyArgumentType is returning a malformed value; EmitVAArg should assert that it

[clang] [X86_32][C++] fix 0 sized struct case in vaarg. (PR #86388)

2024-07-12 Thread Longsheng Mou via cfe-commits
CoTinker wrote: Inconsistency here is inevitable. Such struct `SuperEmpty { struct{ int a[0];} b;}` in c++ mode can not be ignored in i386 for that c++ fields are never empty, and its TypeInfo.Width = TypeInfo.Align = 0.

[clang] [X86_32][C++] fix 0 sized struct case in vaarg. (PR #86388)

2024-03-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If you implement #86075 like I suggested, the inconsistency here also goes away, I think: if va_arg queries classifyArgumentType, you get the same result as argument lowering, so clang becomes self-consistent. (Whether that's gcc-compatible is a different question...)

[clang] [X86_32][C++] fix 0 sized struct case in vaarg. (PR #86388)

2024-03-25 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker edited https://github.com/llvm/llvm-project/pull/86388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits