[PATCH] D14198: Make the modernize-loop-convert's const-detection smarter.
Angel Garcia via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 30 06:27:40 PDT 2015
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: alexfh, cfe-commits.
Now, it detects that several kinds of usages are can't modify the elements. Examples:
-When an usage is a call to a const member function or operator of the element.
-If the element is used as an argument to a function or constructor that takes a const-reference or a value.
-LValue to RValue conversion, if the element is a fundamental type (which allows the use of most of the builtin operators).
http://reviews.llvm.org/D14198
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
test/clang-tidy/modernize-loop-convert-basic.cpp
test/clang-tidy/modernize-loop-convert-camelback.cpp
test/clang-tidy/modernize-loop-convert-const.cpp
test/clang-tidy/modernize-loop-convert-extra.cpp
test/clang-tidy/modernize-loop-convert-lowercase.cpp
test/clang-tidy/modernize-loop-convert-uppercase.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14198.38800.patch
Type: text/x-patch
Size: 32561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151030/0019a0e9/attachment-0001.bin>
More information about the cfe-commits
mailing list