This is an archive of the discontinued LLVM Phabricator instance.

[Bugpoint] fix another use-after-move. NFC
ClosedPublic

Authored by nickdesaulniers on May 19 2019, 6:46 PM.

Details

Summary

This was flagged in https://www.viva64.com/en/b/0629/ under "Snippet No.
7".

These statements are order independent, short of the use-after-move.

Diff Detail

Repository
rL LLVM

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2019, 6:46 PM
RKSimon accepted this revision.May 21 2019, 4:41 AM

LGTM

This revision is now accepted and ready to land.May 21 2019, 4:41 AM

Is this code tested? (what happens if you replace this code with "assert(false);" and then run make check?) If not, it'd be good to add some test coverage that this has revealed is missing.

Is this code tested?

Doesn't look like it is. I guess I would have expected a bugpoint directory under llvm/test/tools/.

If not, it'd be good to add some test coverage that this has revealed is missing.

I agree. Filed: https://bugs.llvm.org/show_bug.cgi?id=41970

Correction: -DLLVM_BUILD_LLVM_DYLIB="ON" is required to run ninja check-llvm-bugpoint.

It doesn't look like any existing tests under llvm/tests/BugPoint/ call this method at all.

This revision was automatically updated to reflect the committed changes.