diff --git a/test/testclass.cpp b/test/testclass.cpp index c9dde77fae5..6f37f0c3c92 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -8951,6 +8951,10 @@ class TestClass : public TestFixture { " std::string f(std::string s) { return s; }\n" "};\n"); ASSERT_EQUALS("", errout_str()); + + checkReturnByReference("struct S { S(); };\n" // #12620 + "S::S() = delete;\n"); + ASSERT_EQUALS("", errout_str()); // don't crash } };