[PATCH] D152132: [clang][Inter] Fix lifetime diagnostics for dead records
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 1 07:05:36 PDT 2023
aaron.ballman added a comment.
I think this is mostly good, but I did run into a question about removing the assertion so I might still be missing something about the changes.
================
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()) {
----------------
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.
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