[PATCH] D14282: Improve more the const-detection in modernize-loop-convert.
Angel Garcia via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 3 06:04:41 PST 2015
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
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.
http://reviews.llvm.org/D14282
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
test/clang-tidy/modernize-loop-convert-const.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14282.39052.patch
Type: text/x-patch
Size: 3436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151103/5ad6a4a0/attachment.bin>
More information about the cfe-commits
mailing list