[PATCH] D137082: [clang][Interp] Fix dereferencing arrays with no offset applied

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 2 11:40:27 PDT 2022


aaron.ballman 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())
----------------
So why don't we need to do this dance for `Store`/`StorePop`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137082/new/

https://reviews.llvm.org/D137082



More information about the cfe-commits mailing list