From 6a749b75dc6d0c274b52f22a189699ccbc9f26f2 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:48:58 +0200 Subject: [PATCH] Update testclass.cpp --- test/testclass.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 } };