This is an archive of the discontinued LLVM Phabricator instance.

ScalarEvolution: added tmp to avoid use-after-dtor in for loop.
ClosedPublic

Authored by nmusgrave on Sep 16 2015, 2:16 PM.

Details

Summary

For loop destroyed current instance before invoking next.
Temporary variable added to prevent use-after-dtor when invoke
destructor on current instance.

Diff Detail

Event Timeline

nmusgrave updated this revision to Diff 34924.Sep 16 2015, 2:16 PM
nmusgrave retitled this revision from to ScalarEvolution: added tmp to avoid use-after-dtor in for loop..
nmusgrave updated this object.
nmusgrave added a reviewer: eugenis.
nmusgrave added a subscriber: llvm-commits.
nmusgrave updated this object.Sep 16 2015, 2:23 PM
nmusgrave updated this object.
eugenis added inline comments.Sep 16 2015, 2:49 PM
lib/Analysis/ScalarEvolution.cpp
8398

I think the name should start with a capital letter: Tmp.

nmusgrave updated this revision to Diff 34932.Sep 16 2015, 3:27 PM
nmusgrave marked an inline comment as done.
nmusgrave updated this object.
  • Rename temp var.
eugenis accepted this revision.Sep 16 2015, 3:28 PM
eugenis edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 16 2015, 3:28 PM
nmusgrave closed this revision.Sep 16 2015, 4:49 PM