xazax.hun added a comment.

Ok, I think I know what is going on.

Basically, we have a `MutableArrayRef` which is NOT a pointer as it is NOT 
annotated as `gsl::Pointer`. So in the AST we see a local non-pointer object, 
and we derive a pointer from this local object. This is why the warnings thinks 
that we return the address of a local variable. In case we do annotate 
`MutableArrayRef` to be a Pointer we will no longer see the warning.

Do you think we should stop the tracking after seeing a `DerivedToBase` cast? 
Or should we continue to report those errors so the users can add the missing 
annotation? I feel like this is something that is potentially up for a debate.,


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66486



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

Reply via email to