================
@@ -181,6 +190,11 @@ void LifetimeModeling::checkDeadSymbols(SymbolReaper 
&SymReaper,
     if (!SymReaper.isLiveRegion(Region))
       State = State->remove<DeallocatedSourceSet>(Region);
   }
+
+  for (const MemRegion *Region : Reported) {
+    if (!SymReaper.isLiveRegion(Region))
+      State = State->remove<ReportedDeadRegions>(Region);
+  }
----------------
benedekaibas wrote:

I think, yes we should. Currently if there are multiple dereferences the 
checker emits warning for the first one which makes sense, but what if the user 
want to check if there are multiple dereferences of the same object afterwards? 
I think this is where `printState` can "shine" and help the user figure out if 
there are any more dereferences of the same object.

Applied changes here: 
[a44befc](https://github.com/llvm/llvm-project/pull/215409/commits/a44befc77019d7a6fa68bd071a0a9e0deb05d70d)

https://github.com/llvm/llvm-project/pull/215409
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to