PiotrZSL accepted this revision.
PiotrZSL added a comment.
This revision is now accepted and ready to land.

LGTM, things that are missing:

- some crash protection (getName)
- test for rbegin/rend



================
Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:333
 
+enum IteratorCallKind {
+  ICK_Member,
----------------
if we can, please use enum class


================
Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:363
+      return ContainerCall{TheCall->getImplicitObjectArgument(),
+                           Member->getMemberDecl()->getName(),
+                           Member->isArrow(), CallKind};
----------------
would be nice to verify if we got "name" here, same in other places


================
Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:940
+        return false;
+    } else
+      return Nodes.getNodeAs<CallExpr>(EndCallName) != nullptr;
----------------
no need for else after return


================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/modernize/loop-convert-basic.cpp:484
 }
 
 // Tests to verify the proper use of auto where the init variable type and the
----------------
Please add test with rbegin/rend


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140760/new/

https://reviews.llvm.org/D140760

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to