-
Notifications
You must be signed in to change notification settings - Fork 7
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
Array use after pop front detector #41
Conversation
let message = format!( | ||
"An array is used after removing elements from it in the function {}", | ||
&function.name() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to print the array ID in sierra
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|| self.check_calls( | ||
compilation_unit, | ||
function, | ||
bad_array, | ||
&mut function.private_functions_calls(), | ||
) | ||
|| self.check_calls( | ||
compilation_unit, | ||
function, | ||
bad_array, | ||
&mut function.library_functions_calls(), | ||
) | ||
|| self.check_calls( | ||
compilation_unit, | ||
function, | ||
bad_array, | ||
&mut function.external_functions_calls(), | ||
) | ||
|| self.check_calls( | ||
compilation_unit, | ||
function, | ||
bad_array, | ||
&mut function.events_emitted(), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can make this into a single call to check_calls by chaining the iterators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Ready for review.