[libc-commits] [clang-tools-extra] [flang] [compiler-rt] [clang] [llvm] [libc] [libcxx] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)
John McCall via libc-commits
libc-commits at lists.llvm.org
Fri Dec 15 12:53:05 PST 2023
================
@@ -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:
We have other code that computes the value of the `__counted_by` bound when we e.g. load a pointer from a field with the attribute, yes?
https://github.com/llvm/llvm-project/pull/73730
More information about the libc-commits
mailing list