File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4633,7 +4633,7 @@ class TestCondition : public TestFixture {
46334633 " }\n " );
46344634 ASSERT_EQUALS (" " , errout_str ());
46354635
4636- check (" int h();\n "
4636+ check (" int h();\n " // #12858
46374637 " bool g() {\n "
46384638 " bool b{};\n "
46394639 " try {\n "
@@ -4652,6 +4652,24 @@ class TestCondition : public TestFixture {
46524652 " if (g()) {}\n "
46534653 " }\n " );
46544654 ASSERT_EQUALS (" " , errout_str ());
4655+
4656+ check (" int f(int x, int y) {\n " // #11822
4657+ " if (x) {\n "
4658+ " switch (y) {\n "
4659+ " case 1:\n "
4660+ " return 7;\n "
4661+ " }\n "
4662+ " }\n "
4663+ " \n "
4664+ " if (y)\n "
4665+ " return 8;\n "
4666+ " \n "
4667+ " if (x)\n "
4668+ " return 9;\n "
4669+ " \n "
4670+ " return 0;\n "
4671+ " }" );
4672+ ASSERT_EQUALS (" " , errout_str ());
46554673 }
46564674
46574675 void alwaysTrueSymbolic ()
You can’t perform that action at this time.
0 commit comments