This is an archive of the discontinued LLVM Phabricator instance.

[Lifetimes] Fix false positive warning from BUG 49342
ClosedPublic

Authored by xazax.hun on Feb 26 2021, 6:59 PM.

Details

Summary

After some interaction between the statement local lifetime analysis and some newly introduced warnings (https://github.com/llvm/llvm-project/commit/2177e4555ab84771c611a3295ab1149af7f79c29), a new false positive pattern appeared. This patch updates the logic that is responsible to make sure we only warn for a returned GslPointer when it was initialized from a value with a local owner.

Diff Detail

Event Timeline

xazax.hun created this revision.Feb 26 2021, 6:59 PM
xazax.hun requested review of this revision.Feb 26 2021, 6:59 PM
rsmith accepted this revision.Feb 26 2021, 8:20 PM
This revision is now accepted and ready to land.Feb 26 2021, 8:20 PM
This revision was landed with ongoing or failed builds.Feb 27 2021, 8:16 AM
This revision was automatically updated to reflect the committed changes.