klimek accepted this revision.
klimek added a comment.
This revision is now accepted and ready to land.
LG
http://reviews.llvm.org/D13133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
angelgarcia updated this revision to Diff 35629.
angelgarcia added a comment.
Add comment.
http://reviews.llvm.org/D13133
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
test/clang-tidy/modernize-loop-convert-basic.cpp
test/clang-tidy/modernize-loop-convert-extra.cpp
Index: test/clang-t
angelgarcia added a comment.
Usage.Expression can be:
-CXXMemberCallExpr: "container.at(i)"
-CXXOperatorCallExpr: "*it" or "container[i]"
-ArraySubscripExpr: "Arr[i]"
-UnaryOperator: "*ptr"
-MemberExpr: "it->member" (we only replace "it->" with "elem." in this
case).
The point is that all of them
klimek added inline comments.
Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:482
@@ +481,3 @@
+auto Parents = Context->getParents(*Usage.Expression);
+if (Parents.size() == 1) {
+ if (const auto *Paren = Parents[0].get())
Perhaps ad
angelgarcia updated this revision to Diff 35626.
angelgarcia added a comment.
Added a test where the parenthesis must not be removed, and one where they
should.
http://reviews.llvm.org/D13133
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
test/clang-tidy/modernize-loop-convert-basic.cpp
klimek added a comment.
Can you add a test where we need the parens? (where the element is of ** type
or something)
http://reviews.llvm.org/D13133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinf
angelgarcia created this revision.
angelgarcia added a reviewer: alexfh.
angelgarcia added subscribers: klimek, cfe-commits.
Remove parenthesis surrounding the new loop index.
http://reviews.llvm.org/D13133
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
test/clang-tidy/modernize-loop-conve