[flang-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 flang-commits flang-commits at lists.llvm.org
Fri Dec 15 13:03: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:

I understand that this patch specifically can be thought of as trying to do something fairly modest.  However, it is a part of a sequence of patches that I haven't been paying much attention to, and what it is actually doing makes me concerned about the larger sequence of patches and whether you might be implementing something that doesn't make a whole lot of sense. I am trying to understand what's going on to see if maybe I can course-correct and make sure that the overall feature is a good one.

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


More information about the flang-commits mailing list