File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4448,6 +4448,15 @@ class TestCondition : public TestFixture {
44484448 " *n == 'A');\n "
44494449 " }\n " );
44504450 ASSERT_EQUALS (" " , errout.str ());
4451+
4452+ check (" void f(std::istringstream& i) {\n " // #9327
4453+ " std::string s;\n "
4454+ " if (!(i >> s))\n "
4455+ " return;\n "
4456+ " if (!(i >> s))\n "
4457+ " return;\n "
4458+ " }\n " );
4459+ ASSERT_EQUALS (" " , errout.str ());
44514460 }
44524461
44534462 void alwaysTrueSymbolic ()
Original file line number Diff line number Diff line change @@ -3506,14 +3506,20 @@ class TestUnusedVar : public TestFixture {
35063506 ASSERT_EQUALS (" " , errout.str ());
35073507 }
35083508
3509- void localvar60 () { // #10531
3510- functionVariableUsage (" void Scale(double scale) {\n "
3509+ void localvar60 () {
3510+ functionVariableUsage (" void Scale(double scale) {\n " // #10531
35113511 " for (int i = 0; i < m_points.size(); ++i) {\n "
35123512 " auto& p = m_points[i];\n "
35133513 " p += scale;\n "
35143514 " }\n "
35153515 " }" );
35163516 ASSERT_EQUALS (" " , errout.str ());
3517+
3518+ functionVariableUsage (" void foo(int c[]) {\n " // #10597
3519+ " int& cc = c[0];\n "
3520+ " cc &= ~0xff;\n "
3521+ " }\n " );
3522+ ASSERT_EQUALS (" " , errout.str ());
35173523 }
35183524
35193525 void localvar61 () { // #9407
You can’t perform that action at this time.
0 commit comments