summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/ArrayRefTest.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-01-01 13:01:25 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-01-01 13:01:25 +0000
commita1f4697dbad17f81e0fba0cc532d0ce4e1cdce75 (patch)
tree90b1fc9f4339a2ed283c06a11e2e5c5e49ce3903 /llvm/unittests/ADT/ArrayRefTest.cpp
parent6044c0bc78f4588e9bcacaea4707f473445c161c (diff)
downloadbcm5719-llvm-a1f4697dbad17f81e0fba0cc532d0ce4e1cdce75.tar.gz
bcm5719-llvm-a1f4697dbad17f81e0fba0cc532d0ce4e1cdce75.zip
Revert r225053: Add an ArrayRef upcasting constructor from ArrayRef<U*> -> ArrayRef<T*> 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
Diffstat (limited to 'llvm/unittests/ADT/ArrayRefTest.cpp')
-rw-r--r--llvm/unittests/ADT/ArrayRefTest.cpp35
1 files changed, 0 insertions, 35 deletions
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<int *>(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<B *> BArray(DataPtrs, 5);
- ArrayRef<A *> 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
OpenPOWER on IntegriCloud