* Add test for #9327 * Add test for #10597
This commit is contained in:
parent
4634a72fe0
commit
3b5601dbea
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue