diff --git a/test/testcondition.cpp b/test/testcondition.cpp index d35474d91..3157e68dc 100644 --- a/test/testcondition.cpp +++ b/test/testcondition.cpp @@ -4448,6 +4448,15 @@ private: " *n == 'A');\n" "}\n"); ASSERT_EQUALS("", errout.str()); + + check("void f(std::istringstream& i) {\n" // #9327 + " std::string s;\n" + " if (!(i >> s))\n" + " return;\n" + " if (!(i >> s))\n" + " return;\n" + "}\n"); + ASSERT_EQUALS("", errout.str()); } void alwaysTrueSymbolic() diff --git a/test/testunusedvar.cpp b/test/testunusedvar.cpp index cdd247163..af675bcfa 100644 --- a/test/testunusedvar.cpp +++ b/test/testunusedvar.cpp @@ -3506,14 +3506,20 @@ private: ASSERT_EQUALS("", errout.str()); } - void localvar60() { // #10531 - functionVariableUsage("void Scale(double scale) {\n" + void localvar60() { + functionVariableUsage("void Scale(double scale) {\n" // #10531 " for (int i = 0; i < m_points.size(); ++i) {\n" " auto& p = m_points[i];\n" " p += scale;\n" " }\n" "}"); ASSERT_EQUALS("", errout.str()); + + functionVariableUsage("void foo(int c[]) {\n" // #10597 + " int& cc = c[0];\n" + " cc &= ~0xff;\n" + "}\n"); + ASSERT_EQUALS("", errout.str()); } void localvar61() { // #9407