This is an archive of the discontinued LLVM Phabricator instance.

[LifetimeAnalysis] Fix PR44150
ClosedPublic

Authored by xazax.hun on Nov 26 2019, 5:10 PM.

Details

Summary

We really wanted to avoid special handling of references but it looks like this is inevitable.

The main difference is the following, if you copy a gsl::Pointer, like an iterator, the result will dangle if and only if the original instance would dangle as well. Basically the copy just propagates the points-to set. But this is not the case for references. If we create an object from a reference it is often more similar to a dereference operation, or an LValueToRValue cast. This patch attempts to address this difference.

Diff Detail

Event Timeline

xazax.hun created this revision.Nov 26 2019, 5:10 PM
gribozavr2 accepted this revision.Nov 27 2019, 12:00 AM
This revision is now accepted and ready to land.Nov 27 2019, 12:00 AM
This revision was automatically updated to reflect the committed changes.