aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/ASTMatchers/ASTMatchersNodeTest.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/ASTMatchers/ASTMatchersNodeTest.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/ASTMatchers/ASTMatchersNodeTest.cpp')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
index 2e42b85..f2eaf19 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
@@ -1427,8 +1427,8 @@ TEST_P(ASTMatchersTest,
return;
}
StringRef code = "namespace std {"
- "template <typename> class initializer_list {"
- " public: initializer_list() noexcept {}"
+ "template <typename E> class initializer_list {"
+ " public: const E *a, *b;"
"};"
"}"
"struct A {"