[Clang][Interp] Diagnose uninitialized ctor of global record arrays
authorTakuya Shimizu <shimizu2486@gmail.com>
Wed, 21 Jun 2023 10:03:01 +0000 (19:03 +0900)
committerTakuya Shimizu <shimizu2486@gmail.com>
Wed, 21 Jun 2023 10:03:01 +0000 (19:03 +0900)
commitdfb85c3ce09a7bd1a059a3e821390b5111454f9e
tree5499d708c03475d781671d1d66ad54e82c8e807b
parent9119325a5666e557a19f38a05525578b556c215b
[Clang][Interp] Diagnose uninitialized ctor of global record arrays

This patch adds a check for uninitialized subobjects of global variables that are record arrays.
e.g. `constexpr Foo f[2];`

Reviewed By: tbaeder

Differential Revision: https://reviews.llvm.org/D152548
clang/lib/AST/Interp/ByteCodeExprGen.h
clang/lib/AST/Interp/Interp.cpp
clang/test/AST/Interp/cxx20.cpp