[llvm] r345690 - 2nd attempt to fix ambiguities because of ADL
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 30 18:58:01 PDT 2018
Author: matze
Date: Tue Oct 30 18:58:00 2018
New Revision: 345690
URL: http://llvm.org/viewvc/llvm-project?rev=345690&view=rev
Log:
2nd attempt to fix ambiguities because of ADL
Modified:
llvm/trunk/unittests/ADT/STLExtrasTest.cpp
Modified: llvm/trunk/unittests/ADT/STLExtrasTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/STLExtrasTest.cpp?rev=345690&r1=345689&r2=345690&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/STLExtrasTest.cpp (original)
+++ llvm/trunk/unittests/ADT/STLExtrasTest.cpp Tue Oct 30 18:58:00 2018
@@ -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) {
More information about the llvm-commits
mailing list