#6426 FP duplicateExpressionTernary - (expr) ? ~0u : ~0ul. Add regression test
This commit is contained in:
parent
48d33da1d5
commit
7581231d9d
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue