[llvm] [ADT] Add DenseSet::insert_range (PR #131567)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 17 09:46:37 PDT 2025


================
@@ -32,6 +32,17 @@ TEST(DenseSetTest, DoubleEntrySetTest) {
   EXPECT_EQ(0u, set.count(2));
 }
 
+TEST(DenseSetTest, InsertRange) {
+  llvm::DenseSet<unsigned> set1;
+  llvm::DenseSet<unsigned> set2;
+  set1.insert(1);
+  set1.insert(2);
+  set1.insert(3);
+  constexpr unsigned Args[] = {3, 1, 2};
+  set2.insert_range(Args);
+  EXPECT_EQ(set1, set2);
----------------
kazutakahirata wrote:

Revised in the latest iteration.


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


More information about the llvm-commits mailing list