[clang] [LifetimeSafety] Introduce a liveness-based lifetime policy (PR #159991)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 7 10:20:09 PDT 2025


================
@@ -974,62 +976,46 @@ static llvm::ImmutableSet<T> join(llvm::ImmutableSet<T> A,
   return A;
 }
 
-/// Checks if set A is a subset of set B.
-template <typename T>
-static bool isSubsetOf(const llvm::ImmutableSet<T> &A,
-                       const llvm::ImmutableSet<T> &B) {
-  // Empty set is a subset of all sets.
-  if (A.isEmpty())
-    return true;
-
-  for (const T &Elem : A)
-    if (!B.contains(Elem))
-      return false;
-  return true;
-}
-
 /// Computes the key-wise union of two ImmutableMaps.
+/// \param SymmetricJoin If true, the join is symmetric, applying JoinValues to
----------------
usx95 wrote:

Added documentation for this. SymmetricJoin should always be correct to use while Asymmetric one serves as a performance optimisation when the analyses can get away with it.

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


More information about the cfe-commits mailing list