tbaeder added inline comments.
================
Comment at: clang/lib/AST/Interp/Interp.h:966-967
return false;
- S.Stk.push<T>(Ptr.deref<T>());
+ // When getting the first value of an array, we need to offset to the
+ // first element.
+ if (Ptr.inArray() && Ptr.isRoot())
----------------
aaron.ballman wrote:
> So why don't we need to do this dance for `Store`/`StorePop`?
We do, I just realized.
It might make more sense to do this in `Pointer::deref()` directly, so
'deref()`'ing an array always returns the first element.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137082/new/
https://reviews.llvm.org/D137082
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits