angelgarcia updated this revision to Diff 38930.
angelgarcia added a comment.
OK, is it better now?
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/
klimek accepted this revision.
klimek added a comment.
This revision is now accepted and ready to land.
LG. Much better, thanks!
http://reviews.llvm.org/D14198
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mai
klimek added inline comments.
Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:371-374
@@ -370,1 +370,6 @@
+/// \brief Returns false when it can be guaranteed that no element of the
+/// container we are iterating over is going to be modified due to this
+/// expression.
+s
angelgarcia added a comment.
> Reading just this function, it is unclear what the 'container' is.
It should be clearer now.
> Can't CaptureBuRef be modified?
I added a comment with an explanation.
> But they are aliases. Shouldn't we then go into the const-ness of the
aliases?
I wanted to
angelgarcia updated this revision to Diff 38881.
angelgarcia added a comment.
Improve comments and add more tests.
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-camelb
klimek added inline comments.
Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:371-373
@@ -370,1 +370,5 @@
+/// \brief Returns false when it can be guaranteed that no container element
+/// is going to be modified due to this expression.
+static bool canBeModified(ASTContex
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 th