Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed TODO-test for CheckCondition::checkBadBitmaskCheck by handling functions return bool. #665

Merged
merged 1 commit into from Sep 3, 2015

Conversation

simartin
Copy link
Contributor

@simartin simartin commented Sep 2, 2015

Hi,

This patch fixes a TODO test case by properly detecting "x | non_null_integer" patterns returned in boolean functions. Thanks to consider merging.

Cheers,
Simon

@PKEuS
Copy link
Contributor

PKEuS commented Sep 3, 2015

This fix does not fix the false negative entirely, because I guess that it fails if the return is in an inner scope.

@simartin
Copy link
Contributor Author

simartin commented Sep 3, 2015

Patch updated to show that inner scopes are handled (if I properly understood PKEuS' comment)

@PKEuS
Copy link
Contributor

PKEuS commented Sep 3, 2015

No, you misunderstood me. I was not talking about typedefs, I was more talking about inner scopes in the function like if/for/while. Does it work for code like this?

if(z) return x|0x02;

@simartin
Copy link
Contributor Author

simartin commented Sep 3, 2015

Thanks, this is clear now, and you were right, this case was not supported. Hence the updated patch.

PKEuS added a commit that referenced this pull request Sep 3, 2015
Fixed TODO-test for CheckCondition::checkBadBitmaskCheck by handling functions return bool.
@PKEuS PKEuS merged commit b49c5d7 into danmar:master Sep 3, 2015
@simartin simartin deleted the todo_condition branch September 3, 2015 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants