Eugene.Zelenko added inline comments.
================ Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:94 + +std::unique_ptr<ExprSequence> createSequence(Stmt *FunctionBody, + ASTContext &ASTCtx) { ---------------- Missing static? ================ Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:102 + if (!TheCFG) + return std::unique_ptr<ExprSequence>(); + ---------------- May be return {}? ================ Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:125 + + auto CondVarMatches = + match(findAll(declRefExpr(to(varDecl().bind("condvar")))), *Cond, ASTCtx); ---------------- const auto? ================ Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:130 + + for (auto &E : CondVarMatches) { + const VarDecl *CondVar = E.getNodeAs<VarDecl>("condvar"); ---------------- const auto? ================ Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:142 + // (excluding the init stmt). + if (auto ForLoop = dyn_cast<ForStmt>(LoopStmt)) { + if (ForLoop->getInc()) ---------------- const auto? ================ Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:168 + *FunctionBody, ASTCtx); + for (auto &ES : Match) { + if (Sequence->potentiallyAfter(LoopStmt, ES.getNodeAs<Stmt>("escStmt"))) ---------------- const auto? ================ Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:176 + std::string CondVarNames = ""; + for (auto &CVM : CondVarMatches) { + CondVarNames += CVM.getNodeAs<VarDecl>("condvar")->getNameAsString() + ", "; ---------------- const auto? https://reviews.llvm.org/D40937 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits