[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 11:55:54 PDT 2019
mgehre added a comment.
> Also it feels a bit weird to change the ownership semantics in a derived class, I bet that would violate the Liskov substitution principle.
And then we see that llvm::OwningArrayRef inherits from llvm::ArrayRef ... But maybe this direction (strengthening a Pointer into an Owner)
is okay. We'll need to go though the call rules, and see if something breaks when the caller passes an Owner to a function that takes a base class (i.e. Pointer).
My initial reaction is that this should work in general. An Owner is like a Pointer that points to {static}.
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