================
@@ -1238,12 +1238,12 @@ class StoreSiteFinder final : public 
TrackingBugReporterVisitor {
   ///        changes to its value in a nested stackframe could be pruned, and
   ///        this visitor can prevent that without polluting the bugpath too
   ///        much.
-  StoreSiteFinder(bugreporter::TrackerRef ParentTracker, KnownSVal V,
+  StoreSiteFinder(bugreporter::TrackerRef ParentTracker, SVal V,
                   const MemRegion *R, TrackingOptions Options,
                   const StackFrameContext *OriginSFC = nullptr)
       : TrackingBugReporterVisitor(ParentTracker), R(R), V(V), 
Options(Options),
         OriginSFC(OriginSFC) {
-    assert(R);
+    assert(!V.isUnknown() && R);
----------------
NagyDonat wrote:

Actually, I realized that it's better to avoid asserting that `V` is not 
unknown. This is a precondition that _happens to be satisfied_ because this 
class is constructed in one single location and that is preceded by a 
`!V.isUnknown()` check -- but I'm fairly certain that the actual implementation 
of `StoreSiteFinder` can find a site where `UnknownVal` was stored in a region. 

https://github.com/llvm/llvm-project/pull/86953
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to