aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
diff options
context:
space:
mode:
authorMital Ashok <mital@mitalashok.co.uk>2024-06-20 18:44:06 +0100
committerGitHub <noreply@github.com>2024-06-20 19:44:06 +0200
commit482c41e992c1edf8833a4577b56ff9dda49fbc83 (patch)
tree6a606c6bb325ce7e825bdc50a07ce6e734badb7a /clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
parent6cea40400df542a1a4a6d35b45cbe3367f2c32b7 (diff)
downloadllvm-482c41e992c1edf8833a4577b56ff9dda49fbc83.zip
llvm-482c41e992c1edf8833a4577b56ff9dda49fbc83.tar.gz
llvm-482c41e992c1edf8833a4577b56ff9dda49fbc83.tar.bz2
[Clang] [Sema] Diagnose unknown std::initializer_list layout in SemaInit (#95580)
This checks if the layout of `std::initializer_list` is something Clang can handle much earlier and deduplicates the checks in CodeGen/CGExprAgg.cpp and AST/ExprConstant.cpp Also now diagnose `union initializer_list` (Fixes #95495), bit-field for the size (Fixes a crash that would happen during codegen if it were unnamed), base classes (that wouldn't be initialized) and polymorphic classes (whose vtable pointer wouldn't be initialized).
Diffstat (limited to 'clang/unittests/Analysis/FlowSensitive/TransferTest.cpp')
-rw-r--r--clang/unittests/Analysis/FlowSensitive/TransferTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
index 2a74d7f..cfbc64c 100644
--- a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
+++ b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
@@ -3265,7 +3265,7 @@ TEST(TransferTest, ResultObjectLocationForStdInitializerListExpr) {
std::string Code = R"(
namespace std {
template <typename T>
- struct initializer_list {};
+ struct initializer_list { const T *a, *b; };
} // namespace std
void target() {