[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 24 11:09:12 PST 2025


================
@@ -437,7 +437,7 @@ bool SymbolReaper::isLiveRegion(const MemRegion *MR) {
   // tell if anything still refers to this region. Unlike SymbolicRegions,
   // AllocaRegions don't have associated symbols, though, so we don't actually
   // have a way to track their liveness.
-  return isa<AllocaRegion, CXXThisRegion, MemSpaceRegion, CodeTextRegion>(MR);
+  return isa<AllocaRegion, CXXThisRegion, CodeTextRegion>(MR);
----------------
steakhal wrote:

I'd say, probably its unlikely that someone would query if a memspace is alive or not.
You can only get a memspace if you directly ask for it using the `getMemorySpace()`. `getBaseRegion()` is not enough.
So my guess is that this part could be even dead. Could you put an assert there that MR is never a memregion to see if this is ever called with one?

https://github.com/llvm/llvm-project/pull/123003


More information about the cfe-commits mailing list