-
Notifications
You must be signed in to change notification settings - Fork 4
False-positive with deref address-of #49
Comments
Sure! I'm working on something else, but will try to look into this in a few hours! |
It should be fixed with 4226f4c but I want to run this over some project before creating a PR. |
The solution is not perfect, it did introduce some false positives. I think I will take a more conservative approach for now, and catch new issues again once DerefType is available. |
When there is no deref type available, we can still have explicit or implicit function annotations. E.g. I would suggest to only assume that
|
I am not sure if this is sufficient. We do need to consider the case where the pointer is constructed from something else. For example, we have |
Specifically, the flow-sensitive analysis will not even have a |
std::begin() with an unannotated type cannot do anything sensible and should disable the analysis (i.e. yield a Unknown pset - or The general problem that you are describing might be that we envision function annotations on templated functions, but we might want to have different annotations based on which types the template is instantiated with (i.e. is |
I think there are multiple points there.
We do not even calculate PSets for unannotated types, so annotations are meaningless for those. This is why I think the following is not true:
What do you think? |
For
Maybe I'm confusing here something. |
Should be fixed in https://reviews.llvm.org/D66806 |
Landed. |
See
https://godbolt.org/z/1tWI6O
This lead to reverting https://reviews.llvm.org/D66179.
@Xazax-hun, could you take a look, please?
The text was updated successfully, but these errors were encountered: