[PATCH] D152132: [clang][Interp] Fix lifetime diagnostics for dead records

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 17 04:32:36 PDT 2023


tbaeder added inline comments.


================
Comment at: clang/lib/AST/Interp/Interp.cpp:241
 bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
-  assert(Ptr.isLive() && "Pointer is not live");
   if (!Ptr.isMutable()) {
----------------
aaron.ballman wrote:
> I understand that we were hitting this assertion, but why is removing the assertion the correct approach? I thought it made sense to check for pointer liveness here.
I re-checked and I think I removed this only for testing and it should stay in. The test succeeds like this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152132



More information about the cfe-commits mailing list