[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes
Matthias Gehre via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 23 13:13:43 PDT 2019
mgehre added a comment.
Yes, it means that the automatic inference of Pointer/Owner from base classes has the same issues as all of those automatic inferences: Once can construct a case where they are not true.
So for having no false-positives at all, we should avoid this inference by default and not consider MutableArrayRef to be a gsl::Pointer.
Instead, we disable the analysis when it sees an unannotated class (like here, MutableArrayRef).
Eventually, we can explicitly add the correct annotations to the MutableArrayRef and OwningArrayRef source code,
and provide a command line option to opt into this kind of inference with possible false-positives.
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