llvm.org GIT mirror llvm / e0fdfac
[ArrayRefTest] Work around a GCC 4.8 internal compiler error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244023 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 5 years ago
1 changed file(s) with 2 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
4545 EXPECT_TRUE(Array2.equals(Array2c));
4646 EXPECT_NE(Array2.data(), Array2c.data());
4747
48 #if __GNUC__==4 && __GNUC_MINOR__==8
49 // g++-4.8 cannot compile the block below.
50 #else
5148 // Check that copy can cope with uninitialized memory.
5249 struct NonAssignable {
5350 const char *Ptr;
5451
52 NonAssignable(const char *Ptr) : Ptr(Ptr) {}
5553 NonAssignable(const NonAssignable &RHS) = default;
5654 void operator=(const NonAssignable &RHS) { assert(RHS.Ptr != nullptr); }
5755 bool operator==(const NonAssignable &RHS) const { return Ptr == RHS.Ptr; }
58 } Array3Src[] = {{"hello"}, {"world"}};
56 } Array3Src[] = {"hello", "world"};
5957 ArrayRef Array3Copy = makeArrayRef(Array3Src).copy(Alloc);
6058 EXPECT_EQ(makeArrayRef(Array3Src), Array3Copy);
6159 EXPECT_NE(makeArrayRef(Array3Src).data(), Array3Copy.data());
62 #endif
6360 }
6461
6562 TEST(ArrayRefTest, DropBack) {