aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/test/clang-tidy/checkers/readability
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-tools-extra/test/clang-tidy/checkers/readability
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-tools-extra/test/clang-tidy/checkers/readability')
-rw-r--r--clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp
index f42f2f3..b50ad4c 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp
@@ -31,7 +31,7 @@ struct SomeClass {
namespace std {
template <typename T>
-class initializer_list {};
+class initializer_list { const T *a, *b; };
template <typename T>
class vector {