This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] MisusedMovedObject: NFC: Remove dead code after D18860
ClosedPublic

Authored by NoQ on Nov 9 2018, 6:58 PM.

Details

Summary

Since D18860 addresses the problem that some regions are not properly cleaned up, as explained in D18860#1294011, it's no longer necessary to clean them up manually. This patch removes the respective code from checkEndFunction and from checkPostCall for destructors. No functional change intended.

Diff Detail

Repository
rL LLVM

Event Timeline

NoQ created this revision.Nov 9 2018, 6:58 PM
NoQ updated this revision to Diff 173779.Nov 12 2018, 3:54 PM

Bring back the early return for destructors. Cleaning up the state might be unnecessary, but calling a destructor on a moved object is still fine and should not cause a warning.

Add a test because this wasn't caught by tests.

This revision is now accepted and ready to land.Nov 28 2018, 11:00 AM
This revision was automatically updated to reflect the committed changes.