[clang] fix: compatible C++ empty record with align UB with gcc (PR #72197)

via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 16 05:03:12 PST 2023


hstk30-hw wrote:

This is the code I debug located. Seem the comment is out of date?

https://github.com/llvm/llvm-project/blob/1b82cc1186b8bf716205c9b86b851db667792a64/clang/lib/CodeGen/Targets/AArch64.cpp#L298C1-L311C4 

This issue https://github.com/llvm/llvm-project/commit/1711cc930bda8d27e87a2092bd220c18e4600c98 point that when pass the empty class the `va_list` will get out of sync.


> we should not be considering this an empty class.

It confuse me whether an empty class with alignment (size > 1) is an empty class in C++?



https://github.com/llvm/llvm-project/pull/72197


More information about the cfe-commits mailing list