xazax.hun added a comment.

Are smart pointers special? I would expect to see similar problems with 
containers (or even a nested optional). I wonder whether an allowlist instead 
of a denylist approach is better here. E.g., instead of disabling the modeling 
for smart pointers, we could enable it for cases that we actually support (or 
alternatively, we could add a confidence value to the unsafe access). Usually, 
these checks are pretty robust when we deal with objects on the stack of the 
analyzed function (locals, parameters), but it is really hard to reason about 
objects from the outside (e.g., when a reference to an object is acquired from 
a container or smart pointer) unless we have explicit modeling for the APIs. 
The confidence approach might be useful as we are unlikely to cover all the 
custom smart pointers the users have.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122143/new/

https://reviews.llvm.org/D122143

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to