Regression test for 9106: False positive duplicateCondition for struct member (#2434)
This commit is contained in:
parent
3d3e6f384c
commit
4aa6385a97
|
@ -3481,6 +3481,14 @@ private:
|
|||
" if (y.empty()) return;\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
// #9106
|
||||
check("struct A {int b;};\n"
|
||||
"void f(A a, int c) {\n"
|
||||
" if (a.b) a.b = c;\n"
|
||||
" if (a.b) {}\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void checkInvalidTestForOverflow() {
|
||||
|
|
Loading…
Reference in New Issue