Files
clang-p2996/clang/lib/CodeGen/CGExprConstant.cpp
Michael Buch 2162a18fb2 [clang][CodeGen] Check initializer of zero-size fields for nullptr (#109271)
In https://github.com/llvm/llvm-project/pull/96422 we started treating
empty records as zero-sized for the purpose of layout. In `C`, empty
fields were never considered `isZeroSize`, so we would never have tried
to call `Init->hasSideEffects` on them. But since
https://github.com/llvm/llvm-project/pull/96422 we can get here when
compiling `C`, but `Init` need not exist. This patch adds a null-check
to account for this situtation.
2024-09-20 19:42:41 +01:00

98 KiB