This is an archive of the discontinued LLVM Phabricator instance.

Improve more the const-detection in modernize-loop-convert.
ClosedPublic

Authored by angelgarcia on Nov 3 2015, 6:04 AM.

Details

Summary

The previous change was focused in detecting when a non-const object was used in a constant way. Looks like I forgot the most important and trivial case: when the object is already constant. Failing to detect this cases results in compile errors, due to trying to bind a constant object to a non-const reference in the range-for statement. This change should fix that.

Diff Detail

Repository
rL LLVM

Event Timeline

angelgarcia updated this revision to Diff 39052.Nov 3 2015, 6:04 AM
angelgarcia retitled this revision from to Improve more the const-detection in modernize-loop-convert..
angelgarcia updated this object.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
klimek accepted this revision.Nov 3 2015, 8:32 AM
klimek edited edge metadata.

lg

This revision is now accepted and ready to land.Nov 3 2015, 8:32 AM
angelgarcia closed this revision.Nov 3 2015, 8:33 AM
This revision was automatically updated to reflect the committed changes.