================
@@ -234,19 +225,12 @@ class SmallSet {
   /// Check if the SmallSet contains the given element.
   bool contains(const T &V) const {
     if (isSmall())
-      return vfind(V) != Vector.end();
-    return Set.find(V) != Set.end();
+      return llvm::is_contained(Vector, V);
+    return llvm::is_contained(Set, V);
----------------
dwblaikie wrote:

This advice seems at least inconsistent with the intent of the code per the 
comment:
```
This is intended as the canonical way to check if an
element exists in a range in generic code or range type that does not
expose a `.contains(Element)` member.
```

In this case, the set meets the second requirement - that it does not expose a 
`contains` function?

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

Reply via email to