Skip to content

Commit

Permalink
Update testother.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jul 16, 2024
1 parent f5528ec commit 9ef29a2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/testother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3636,6 +3636,16 @@ class TestOther : public TestFixture {
" g(r[0] * 2);\n"
"}\n");
ASSERT_EQUALS("[test.cpp:6]: (style) Variable 'r' can be declared as reference to const\n", errout_str());

check("std::iostream& get();\n" // #12940
"std::iostream & Fun() {\n"
" auto lam = []() -> std::iostream& {\n"
" std::iostream& ios = get();\n"
" return ios;\n"
" };\n"
" return lam();\n"
"}\n");
ASSERT_EQUALS("", errout_str());
}

void constParameterCallback() {
Expand Down

0 comments on commit 9ef29a2

Please sign in to comment.