Eugene.Zelenko added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:159 + llvm::SmallSet<const Decl *, 16> &Callees) { + if (const CallExpr *Call = dyn_cast<CallExpr>(StmtNode)) { + const Decl *Callee = Call->getDirectCallee(); ---------------- `auto` could be used, because type is spelled in same statement. ================ Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:166 + } + if (const ObjCMessageExpr *Call = dyn_cast<ObjCMessageExpr>(StmtNode)) { + const ObjCMethodDecl *Callee = Call->getMethodDecl(); ---------------- Ditto. ================ Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:200 +static bool hasStaticLocalVariable(const Stmt *Cond) { + if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Cond)) + if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) ---------------- Ditto. ================ Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:201 + if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Cond)) + if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) + if (VD->isStaticLocal()) ---------------- Ditto. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128401/new/ https://reviews.llvm.org/D128401 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits