aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2018-10-31 01:58:00 +0000
committerMatthias Braun <matze@braunis.de>2018-10-31 01:58:00 +0000
commit4f27756950035dc48483bc22392180e7f3030f33 (patch)
tree638beffe5fefe2257a3126db175cc9e8c28dc042 /unittests
parentb6dd98ba241c016501337c75989675186f397e40 (diff)
2nd attempt to fix ambiguities because of ADL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ADT/STLExtrasTest.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/unittests/ADT/STLExtrasTest.cpp b/unittests/ADT/STLExtrasTest.cpp
index 642dc3f6bdd..e65e71fe485 100644
--- a/unittests/ADT/STLExtrasTest.cpp
+++ b/unittests/ADT/STLExtrasTest.cpp
@@ -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) {