Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions test/testother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ class TestOther : public TestFixture {
TEST_CASE(checkCastIntToCharAndBack); // ticket #160

TEST_CASE(checkCommaSeparatedReturn);
TEST_CASE(commaSeparatedReturn_no_fp);
TEST_CASE(checkPassByReference);

TEST_CASE(checkComparisonFunctionIsAlwaysTrueOrFalse);
Expand Down Expand Up @@ -11147,6 +11148,17 @@ class TestOther : public TestFixture {
"}", true, false, false);
ASSERT_EQUALS("", errout_str());
}
void commaSeparatedReturn_no_fp()
{
check(
"int f(){\n"
" int a = 0;\n"
" return a;\n"
"}\n",
true, false, false
);
ASSERT_EQUALS("", errout_str());
}

void checkPassByReference() {
// #8570 passByValue when std::move is used
Expand Down