diff --git a/test/testclass.cpp b/test/testclass.cpp index a0e52a94bcf..b0ffbb6b550 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -8980,7 +8980,12 @@ class TestClass : public TestFixture { "struct D : B {\n" " std::string f() override { return s; }\n" " std::string s;\n" - "}"); + "};\n"); + ASSERT_EQUALS("", errout_str()); + + checkReturnByReference("struct S {\n" + " std::string f(std::string s) { return s; }\n" + "};\n"); ASSERT_EQUALS("", errout_str()); } };