Index: clang-tidy/modernize/LoopConvertUtils.cpp =================================================================== --- clang-tidy/modernize/LoopConvertUtils.cpp +++ clang-tidy/modernize/LoopConvertUtils.cpp @@ -391,8 +391,8 @@ // This check is needed because getMethodDecl can return nullptr if the // callee is a member function pointer. const auto *MDecl = MemCall->getMethodDecl(); - if (MDecl && !isa(MDecl) && MDecl->getName() == "at" && - MemCall->getNumArgs() == 1) { + if (MDecl && !isa(MDecl) && + MDecl->getNameAsString() == "at" && MemCall->getNumArgs() == 1) { return isIndexInSubscriptExpr(MemCall->getArg(0), IndexVar); } return false; Index: test/clang-tidy/modernize-loop-convert-basic.cpp =================================================================== --- test/clang-tidy/modernize-loop-convert-basic.cpp +++ test/clang-tidy/modernize-loop-convert-basic.cpp @@ -320,6 +320,10 @@ // CHECK-FIXES: for (auto & It : Uu) // CHECK-FIXES-NEXT: printf("s has value %d\n", It.X); + for (U::iterator It = Uu.begin(), E = Uu.end(); It != E; ++It) { + Val* a = It.operator->(); + } + U::iterator A; for (U::iterator I = Uu.begin(), E = Uu.end(); I != E; ++I) int K = A->X + I->X;