Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request cleans up the ScanfChecks.qll file as preparation for adopting a shared guards library. The changes primarily involve refactoring the existing predicate logic to be more concise and maintainable.
Key Changes:
- Simplified predicate structure by combining nested
existsclauses - Improved readability through better variable organization
- Removed one branch from
exprInBooleanContextpredicate
| or | ||
| gc.getUnconvertedResultExpression() = e |
There was a problem hiding this comment.
Oh, yes. Sorry I should have made that clear.
This is a left-over from back when we didn't have guard conditions for unary conditions. When we only had the binary guard conditions we did not have a guard condition logic for stuff like if(x) { } and if(!x) { }. So the workaround was to check whether the guard condition was equal to the expression.
I switched the ScanfChecks library to use the unary guard condition predicate in decede5, but I forgot to delete this disjunct.
Another preparation for adopting the shared guards library.
Commit-by-commit review recommended.