aaronpuchert wrote:

These examples shouldn't be affected by alias analysis. We call 
`lockFooWithEscapablePointer(&F)`, which locks `(*(&F))->mu` = `F->mu`, so we 
should be fine accessing `Data.DataMember`.

I guess I should take a closer look what we got wrong there. The idea was to 
identify some expressions that would otherwise be treated different, not to 
treat expressions as different that would otherwise be the same. Especially 
around function calls that is problematic, and we don't really want to rely on 
heuristics so much, because that makes the warning hard to predict. This is not 
the static analyzer, but a regular compiler warning.

https://github.com/llvm/llvm-project/pull/183640
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to