ziqingluo-90 added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:34 /// Return whether `Var` was changed in `LoopStmt`. static bool isChanged(const Stmt *LoopStmt, const VarDecl *Var, ASTContext *Context) { ---------------- NoQ wrote: > Ok so this whole checker does this procedure involving `ExprMutationAnalyzer` > trying to figure out if the variable can be changed from within the loop. I > wonder if our problem of whether the static variable can be changed within > the loop is a sub-problem of this problem and therefore could have a general > solution inside `ExprMutationAnalyzer`. If so, other clang-tidy checks that > use `ExprMutationAnalyzer` could immediately benefit from such solution. WDYT? I think this is a good point. I can do it after this patch. 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