[compiler-rt] [llvm] [libc] [flang] [libcxx] [clang] [clang-tools-extra] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)
Yeoul Na via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 12 01:04:22 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)) {
----------------
rapidsna wrote:
Would it make it easier if you use `CodeGenFunction::EmitLValueForField` instead to get the fields?
https://github.com/llvm/llvm-project/pull/73730
More information about the cfe-commits
mailing list