[compiler-rt] [clang-tools-extra] [libcxx] [clang] [libc] [llvm] [flang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 18 11:59:12 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)) {
----------------
bwendling wrote:

Thanks, @rapidsna. I agree with what you said here. (I also agree with @rjmccall.) I don't want to make anymore changes to this patch though. As @nathanchance pointed out, this is holding up Linux testing / development and I want to submit it soon. I believe it's ready for submission.

To be honest, this patch was only meant as a bug fix, but snowballed out of all proportions. However, I think it's in a state where we could submit this and continue development from there.

I need to point out that this *isn't* the last patch in this feature. I'll have more to follow. Can someone please just give approval so that we can get on with life?

https://github.com/llvm/llvm-project/pull/73730


More information about the cfe-commits mailing list