[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:34:17 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:

BTW why can't you keep this here?
The UnknownMemspace is also a memspace. And you are only changing the semantics of Unknown memspaces, by sayting that you still may have a better memspace for the thing, if you do one more lookup in the State.
Consequently, I don't think you would need to touch this line.

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


More information about the cfe-commits mailing list