Add regression for 9917: false positive: bitwiseOnBoolean when lhs is non-boolean (#3664)

This commit is contained in:
Paul Fultz II 2022-01-02 01:08:28 -06:00 committed by GitHub
parent 0c952ca05d
commit 4b04c86249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -851,6 +851,12 @@ private:
" return f() | f();\n"
"}\n");
ASSERT_EQUALS("", errout.str());
check("uint8 outcode(float p) {\n"
" float d = 0.;\n"
" return ((p - xm >= d) << 1) | (x - p > d);\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}
void incrementBoolean() {