Skip to content

Commit ad73d06

Browse files
committed
Add tests for deep casts.
1 parent 8fcac29 commit ad73d06

File tree

2 files changed

+164
-41
lines changed

2 files changed

+164
-41
lines changed

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4550,7 +4550,7 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E,
45504550
if (const auto *ME = dyn_cast<MemberExpr>(CE->getSubExpr());
45514551
ME && ME->getMemberDecl()->getType()->isCountAttributedType()) {
45524552
LValue LV = EmitCheckedLValue(Base, TCK_MemberAccess);
4553-
EmitCountedByBoundsChecking(E->getBase(), Idx, LV.getAddress(),
4553+
EmitCountedByBoundsChecking(CE->getSubExpr(), Idx, LV.getAddress(),
45544554
E->getIdx()->getType(), ptrType, Accessed,
45554555
/*FlexibleArray=*/false);
45564556
}

0 commit comments

Comments
 (0)