[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 16 05:19:25 PDT 2023
cor3ntin added inline comments.
================
Comment at: clang/lib/AST/Interp/Context.h:88
+ /// Returns the program. This is only needed for unittests.
+ Program &getProgram() const { return *P.get(); }
+
----------------
This should return a const ref
================
Comment at: clang/lib/AST/Interp/Pointer.h:221
}
+
assert(Offset != Base && "not an array element");
----------------
WS only change
================
Comment at: clang/lib/AST/Interp/Pointer.h:342
+
+ // narrow()ed element in a composite array.
+ if (Base > 0 && Base == Offset)
----------------
Can you be a bit more verbose here? I can't figure out what is happening from the comment!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158069/new/
https://reviews.llvm.org/D158069
More information about the cfe-commits
mailing list