#6426 FP duplicateExpressionTernary - (expr) ? ~0u : ~0ul. Add regression test

This commit is contained in:
amai 2018-04-04 14:31:48 +02:00
parent 48d33da1d5
commit 7581231d9d
1 changed files with 6 additions and 0 deletions

View File

@ -3870,6 +3870,12 @@ private:
" return ((x > y) ? (y + x) : (x + y));\n"
"}");
ASSERT_EQUALS("", errout.str());
// #6426
check("void foo(bool flag) {\n"
" bar( (flag) ? ~0u : ~0ul);\n"
"}");
ASSERT_EQUALS("", errout.str());
}
void duplicateValueTernary() {