Fix merge conflicts

This commit is contained in:
Daniel Marjamäki 2018-12-01 19:14:43 +01:00
parent b841b818d2
commit ccbaad32f9
1 changed files with 51 additions and 53 deletions

View File

@ -1510,69 +1510,67 @@ private:
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
<<<<<<< HEAD
<<<<<<< HEAD
check("void f() {\n" check("void f() {\n"
" struct b {\n" " struct b {\n"
" uint32_t f[6];\n" " uint32_t f[6];\n"
" } d;\n" " } d;\n"
" uint32_t *a = d.f;\n" " uint32_t *a = d.f;\n"
======= "}\n");
// Dont decay std::array ASSERT_EQUALS("", errout.str());
check("std::array<char, 1> f() {\n"
" std::array<char, 1> x;\n"
" return x;\n"
>>>>>>> 52f00b8c88aecaa064f1acbebbe59331f08f09fc
"}\n");
ASSERT_EQUALS("", errout.str());
// Make sure we dont hang // Dont decay std::array
check("struct A;\n" check("std::array<char, 1> f() {\n"
"void f() {\n" " std::array<char, 1> x;\n"
" using T = A[3];\n" " return x;\n"
" A &&a = T{1, 2, 3}[1];\n" "}\n");
"}\n"); ASSERT_EQUALS("", errout.str());
ASSERT_EQUALS("", errout.str());
// Make sure we dont hang // Make sure we dont hang
check("struct A;\n" check("struct A;\n"
"void f() {\n" "void f() {\n"
" using T = A[3];\n" " using T = A[3];\n"
" A &&a = T{1, 2, 3}[1]();\n" " A &&a = T{1, 2, 3}[1];\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
=======
// Make sure we dont hang
check("struct A;\n"
"void f() {\n"
" using T = A[3];\n"
" A &&a = T{1, 2, 3}[1];\n"
"}\n");
ASSERT_EQUALS("", errout.str());
// Make sure we dont hang // Make sure we dont hang
check("struct A;\n" check("struct A;\n"
"void f() {\n" "void f() {\n"
" using T = A[3];\n" " using T = A[3];\n"
" A &&a = T{1, 2, 3}[1]();\n" " A &&a = T{1, 2, 3}[1]();\n"
"}\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
// Crash #8872 // Make sure we dont hang
check("struct a {\n" check("struct A;\n"
" void operator()(b c) override {\n" "void f() {\n"
" d(c, [&] { c->e });\n" " using T = A[3];\n"
" }\n" " A &&a = T{1, 2, 3}[1];\n"
"};\n"); "}\n");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
check("struct a {\n" // Make sure we dont hang
" void operator()(b c) override {\n" check("struct A;\n"
" d(c, [=] { c->e });\n" "void f() {\n"
" }\n" " using T = A[3];\n"
"};\n"); " A &&a = T{1, 2, 3}[1]();\n"
ASSERT_EQUALS("", errout.str()); "}\n");
>>>>>>> 6586f2d354d3f9dc26d830b6e641f158a5c58432 ASSERT_EQUALS("", errout.str());
// Crash #8872
check("struct a {\n"
" void operator()(b c) override {\n"
" d(c, [&] { c->e });\n"
" }\n"
"};\n");
ASSERT_EQUALS("", errout.str());
check("struct a {\n"
" void operator()(b c) override {\n"
" d(c, [=] { c->e });\n"
" }\n"
"};\n");
ASSERT_EQUALS("", errout.str());
} }
void danglingLifetimeFunction() { void danglingLifetimeFunction() {