This is an archive of the discontinued LLVM Phabricator instance.

Annotate LookupResult::clear() as LLVM_ATTRIBUTE_REINITIALIZES to silence bugprone-use-after-move after rC342925
ClosedPublic

Authored by MaskRay on Sep 24 2018, 6:08 PM.

Diff Detail

Repository
rC Clang

Event Timeline

MaskRay created this revision.Sep 24 2018, 6:08 PM
MaskRay added a reviewer: Restricted Project.Sep 24 2018, 6:08 PM

I think the check is wrong here. We need this clear call to reinitialize the object after moving from it. Maybe that function should be annotated as reinitializing the object instead?

MaskRay updated this revision to Diff 166805.Sep 24 2018, 10:07 PM

Depends on D52451 (adding LLVM_ATTRIBUTE_REINITIALIZES)

MaskRay updated this revision to Diff 166806.Sep 24 2018, 10:08 PM
MaskRay retitled this revision from Remove Found.clear() to silent bugprone-use-after-move after rC342925 to Annotate LookupResult::clear() as LLVM_ATTRIBUTE_REINITIALIZES to silence bugprone-use-after-move after rC342925.
MaskRay removed a reviewer: Restricted Project.

Update title with arc diff --edit --verbatim

Harbormaster completed remote builds in B23035: Diff 166806.
rsmith accepted this revision.Sep 24 2018, 11:46 PM
This revision is now accepted and ready to land.Sep 24 2018, 11:46 PM
This revision was automatically updated to reflect the committed changes.