This is an archive of the discontinued LLVM Phabricator instance.

Kaleidoscope - toy.cpp use after move fix
ClosedPublic

Authored by szepet on May 6 2017, 7:08 AM.

Details

Summary

The variable Proto is moved at the beginning of the codegen() function.
According to the comment above, the pointed object should be used due the reference P.

Note: This bug was found by the MisusedMovedObject checker, part of the Clang Static Analyzer.

Diff Detail

Event Timeline

szepet created this revision.May 6 2017, 7:08 AM
lhames accepted this revision.May 6 2017, 10:08 AM

Thanks for the fix! Do you have commit access? If so, commit away. If not: let me know and I'll commit it on your behalf.

This revision is now accepted and ready to land.May 6 2017, 10:08 AM
This revision was automatically updated to reflect the committed changes.
szepet added a comment.May 7 2017, 4:22 AM

Thanks for the fast review!