From a1f4697dbad17f81e0fba0cc532d0ce4e1cdce75 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 1 Jan 2015 13:01:25 +0000 Subject: Revert r225053: Add an ArrayRef upcasting constructor from ArrayRef -> ArrayRef where T is a base of U. This appears to have broken at least the windows build bots due to compile errors in the predicate that didn't simply supress the overload. I'm not sure what the fix is, and the bots have been broken for a long time now so I'm just reverting until Michael can figure out a fix. llvm-svn: 225064 --- llvm/unittests/ADT/ArrayRefTest.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'llvm/unittests/ADT/ArrayRefTest.cpp') diff --git a/llvm/unittests/ADT/ArrayRefTest.cpp b/llvm/unittests/ADT/ArrayRefTest.cpp index 9cd17f00d9a..f9c98a563fa 100644 --- a/llvm/unittests/ADT/ArrayRefTest.cpp +++ b/llvm/unittests/ADT/ArrayRefTest.cpp @@ -90,39 +90,4 @@ TEST(ArrayRefTest, ConstConvert) { a = ArrayRef(A); } -struct A { - int data; - - A() : data(0) {} -}; - -struct B : A { - int data2; - - B() : A(), data2(0) {} -}; - -TEST(ArrayRefTest, UpcastConvert) { - B Data[5]; - - for (unsigned i = 0, e = 5; i != e; ++i) { - Data[i].data = i + 5; - Data[i].data2 = i + 30; - } - - B *DataPtrs[5]; - for (unsigned i = 0, e = 5; i != e; ++i) { - DataPtrs[i] = &Data[i]; - } - - ArrayRef BArray(DataPtrs, 5); - ArrayRef AArray(BArray); - - EXPECT_TRUE(AArray.size() == 5); - for (unsigned i = 0, e = 5; i != e; ++i) { - A *a = AArray[i]; - EXPECT_TRUE(a->data == int(i + 5)); - } -} - } // end anonymous namespace -- cgit v1.2.3