[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 20 15:06:24 PDT 2019
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
More information about the cfe-commits
mailing list