This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] `bugprone-use-after-move`: Fix handling of moves in lambda captures
ClosedPublic

Authored by mboehme on Jun 1 2022, 7:38 AM.

Details

Summary

Previously, we were treating a move in the lambda capture as if it happened
within the body of the lambda, not within the function that defines the lambda.

This fixes the same bug as https://reviews.llvm.org/D119165 (which it appears
may have been abandoned by the author?) but does so more simply.

Diff Detail

Event Timeline

mboehme created this revision.Jun 1 2022, 7:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2022, 7:38 AM
mboehme requested review of this revision.Jun 1 2022, 7:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2022, 7:38 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
njames93 accepted this revision.Jun 2 2022, 4:15 AM
njames93 added a subscriber: njames93.

LGTM, But please add a note to ReleaseNotes before landing.

This revision is now accepted and ready to land.Jun 2 2022, 4:15 AM
mboehme updated this revision to Diff 433972.Jun 3 2022, 12:08 AM

Added release notes.

LGTM, But please add a note to ReleaseNotes before landing.

Thanks for reminding me! Done.