2nd attempt to fix ambiguities because of ADL
authorMatthias Braun <matze@braunis.de>
Wed, 31 Oct 2018 01:58:00 +0000 (01:58 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 31 Oct 2018 01:58:00 +0000 (01:58 +0000)
llvm-svn: 345690

llvm/unittests/ADT/STLExtrasTest.cpp

index 642dc3f..e65e71f 100644 (file)
@@ -365,23 +365,20 @@ TEST(STLExtrasTest, ADLTest) {
 }
 
 TEST(STLExtrasTest, EmptyTest) {
-  // Try to avoid ambiguities with C++17 headers.
-  using llvm::empty;
-
   std::vector<void*> V;
-  EXPECT_TRUE(empty(V));
+  EXPECT_TRUE(llvm::empty(V));
   V.push_back(nullptr);
-  EXPECT_FALSE(empty(V));
+  EXPECT_FALSE(llvm::empty(V));
 
   std::initializer_list<int> E = {};
   std::initializer_list<int> NotE = {7, 13, 42};
-  EXPECT_TRUE(empty(E));
-  EXPECT_FALSE(empty(NotE));
+  EXPECT_TRUE(llvm::empty(E));
+  EXPECT_FALSE(llvm::empty(NotE));
 
   auto R0 = make_range(V.begin(), V.begin());
-  EXPECT_TRUE(empty(R0));
+  EXPECT_TRUE(llvm::empty(R0));
   auto R1 = make_range(V.begin(), V.end());
-  EXPECT_FALSE(empty(R1));
+  EXPECT_FALSE(llvm::empty(R1));
 }
 
 TEST(STLExtrasTest, EarlyIncrementTest) {