================ @@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); + if (SanOpts.has(SanitizerKind::ArrayBounds)) { ---------------- rjmccall wrote:
Can we not just reverse the member access to get back to the root of the `counted_by` path? Presumably the root of the `counted_by` path for a field is always the non-transparent context of the field. This should always be at a constant offset from the address point of the field — there's no such thing as an anonymous array. Or am I misunderstanding something important about the constraints on `counted_by` paths? https://github.com/llvm/llvm-project/pull/73730 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits