-
Notifications
You must be signed in to change notification settings - Fork 157
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
unsafe: Add UnsafeCheck visitor #1410
Conversation
c13b255
to
6b14b56
Compare
This visitor takes care of checking for unsafe expressions in safe contexts. This first iteration reports the dereferencing of raw pointers.
93bfdca
to
961468e
Compare
Co-authored-by: philberty <philip.herron@embecosm.com>
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.
LGTM.
Minor nit that in_unsafe_context could be const but you can fix in the next patches. Another minor nit is I would have made the unsafe context a separate class but there is no need to do that right now.
} | ||
|
||
bool | ||
UnsafeChecker::is_unsafe_context () |
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.
this can be const
bors r+ |
Build succeeded: |
This visitor takes care of checking for unsafe expressions in safe
contexts. This first iteration reports the dereferencing of raw
pointers.