File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -7930,10 +7930,12 @@ class MappableExprsHandler {
79307930 ElementType = CAT->getElementType().getTypePtr();
79317931 else if (VAT)
79327932 ElementType = VAT->getElementType().getTypePtr();
7933- else
7934- assert(&Component == &*Components.begin() &&
7935- "Only expect pointer (non CAT or VAT) when this is the "
7936- "first Component");
7933+ else if (&Component == &*Components.begin()) {
7934+ // Handle pointer-based array sections like data[a:b:c]
7935+ if (const auto *PtrType = Ty->getAs<PointerType>()) {
7936+ ElementType = PtrType->getPointeeType().getTypePtr();
7937+ }
7938+ }
79377939 // If ElementType is null, then it means the base is a pointer
79387940 // (neither CAT nor VAT) and we'll attempt to get ElementType again
79397941 // for next iteration.
You can’t perform that action at this time.
0 commit comments