================ @@ -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)) { ---------------- bwendling wrote:
I'm honestly not sure how to do that. I may have missed a method, but if you have the base pointer how do you use that to compute the rest of the expression? For instance, if `p->p->p` is the base, how do I use that to emit the full expression `p->p->p->a.b.c.d.e[index]`? I can skip the extra load here by using the pointer from the `ArrayLV` GEP. 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