================
@@ -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:
Okay, I think I'm starting to see the root of my confusion here. It looks like
you *are* updating the common infrastructure for computing bounds. You are
*also* adding a new bounds check for array subscripts into flexible array
members, and that code seems to be quite a bit more complex than just calling
into the common infrastructure.
@rapidsna Is there a specification for bound expressions? I would like to
understand how this works a little better, and in particular I am concerned
about the idea that bound expressions can involve a path that isn't rooted in
the same struct as the bounded member.
https://github.com/llvm/llvm-project/pull/73730
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits