[clang] [SSAF] Close unsafe-buffer reachability over override families (PR #213319)

Ziqing Luo via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 29 11:52:54 PDT 2026


================
@@ -163,10 +170,24 @@ class UnsafeBufferReachableAnalysis
 
   std::map<EntityId, BoundsPropagationGraph> BPG;
 
+  /// Maps each virtual method slot to the ID of its override family.
+  const llvm::DenseMap<EntityId, EntityId> *FamilyOf = nullptr;
+
+  /// The slots of each override family, excluding type-constrained ones.
----------------
ziqingluo-90 wrote:

>... excluding type-constrained ones.

Ideally, virtual family constraints never need to be aware of type constraints. Currently, type-constrained edges and nodes (EPLs) are removed before DFS. We should probably do it differently, such as enforcing this constraint on the fly in `updateReachablesWith*`.   We don't have to do it now.

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


More information about the cfe-commits mailing list