diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-08-25 10:56:24 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-08-25 10:56:24 +0000 |
| commit | adf62863f35c84e4c5708f3dc5a1589ce958a238 (patch) | |
| tree | 924e88089bbec100de08015b4e496261eb6f2d66 /clang/lib/Sema/SemaInit.cpp | |
| parent | 9b9503334fa856ed4ed6823d35b6f52546296f77 (diff) | |
Vendor import of llvm-project branch release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8.vendor/llvm-project/llvmorg-19.1.0-rc3-0-g437434df21d8
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index dc2ba039afe7..eea4bdfa68b5 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/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)) |
