HomePhabricator

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

Description

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

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.

Reviewers: klimek

Subscribers: alexfh, cfe-commits

Differential Revision: http://reviews.llvm.org/D14282

Details

Committed
angelgarciaNov 3 2015, 8:31 AM
Differential Revision
D14282: Improve more the const-detection in modernize-loop-convert.
Parents
rL251939: Fix thinko.
Branches
Unknown
Tags
Unknown