diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2024-09-20 19:42:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-20 19:42:41 +0100 |
commit | 2162a18fb206736c41c9182737b72ae15d5e6bf0 (patch) | |
tree | 419f19ff810f271ce222686cc688fcaf043bfd8c /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 605420e0a5dc2fe7a13f16a077e044e57f6661af (diff) | |
download | llvm-2162a18fb206736c41c9182737b72ae15d5e6bf0.zip llvm-2162a18fb206736c41c9182737b72ae15d5e6bf0.tar.gz llvm-2162a18fb206736c41c9182737b72ae15d5e6bf0.tar.bz2 |
[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.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions