[clang] [LifetimeSafety] Avoid adding already present items in sets/maps (PR #159582)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 19 08:31:50 PDT 2025


================
@@ -910,6 +910,8 @@ template <typename T>
 static llvm::ImmutableSet<T> join(llvm::ImmutableSet<T> A,
                                   llvm::ImmutableSet<T> B,
                                   typename llvm::ImmutableSet<T>::Factory &F) {
+  if (A == B)
+    return A;
----------------
usx95 wrote:

Added this check as well.

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


More information about the cfe-commits mailing list