diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-08-25 11:12:58 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-10-23 18:27:07 +0000 |
commit | 62987288060ff68c817b7056815aa9fb8ba8ecd7 (patch) | |
tree | d7953c9488f71e79d26c924169988f16e9ba9cee /contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | |
parent | 52418fc2be8efa5172b90a3a9e617017173612c4 (diff) | |
parent | adf62863f35c84e4c5708f3dc5a1589ce958a238 (diff) |
Diffstat (limited to 'contrib/llvm-project/clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp b/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp index dc2ba039afe7..eea4bdfa68b5 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp @@ -515,8 +515,8 @@ class InitListChecker { uint64_t ElsCount = 1; // Otherwise try to fill whole array with embed data. if (Entity.getKind() == InitializedEntity::EK_ArrayElement) { - ValueDecl *ArrDecl = Entity.getParent()->getDecl(); - auto *AType = SemaRef.Context.getAsArrayType(ArrDecl->getType()); + auto *AType = + SemaRef.Context.getAsArrayType(Entity.getParent()->getType()); assert(AType && "expected array type when initializing array"); ElsCount = Embed->getDataElementCount(); if (const auto *CAType = dyn_cast<ConstantArrayType>(AType)) |