Lines Matching defs:LoopStmt
52 /// Return whether `Var` was changed in `LoopStmt`.
53 static bool isChanged(const Stmt *LoopStmt, const VarDecl *Var,
55 if (const auto *ForLoop = dyn_cast<ForStmt>(LoopStmt))
65 return ExprMutationAnalyzer(*LoopStmt, *Context).isMutated(Var);
68 /// Return whether `Cond` is a variable that is possibly changed in `LoopStmt`.
69 static bool isVarThatIsPossiblyChanged(const Decl *Func, const Stmt *LoopStmt,
83 isChanged(LoopStmt, Var, Context);
106 /// Return whether at least one variable of `Cond` changed in `LoopStmt`.
107 static bool isAtLeastOneCondVarChanged(const Decl *Func, const Stmt *LoopStmt,
109 if (isVarThatIsPossiblyChanged(Func, LoopStmt, Cond, Context))
116 if (isAtLeastOneCondVarChanged(Func, LoopStmt, Child, Context))
240 const Stmt *LoopStmt,
248 if (!populateCallees(LoopStmt, CalleesInLoop)) {
261 // overlap with `CalleesInLoop`, there is a recursive call in `LoopStmt`.
290 const auto *LoopStmt = Result.Nodes.getNodeAs<Stmt>("loop-stmt");
297 if (const auto *While = dyn_cast<WhileStmt>(LoopStmt)) {
306 if (ExprMutationAnalyzer::isUnevaluated(LoopStmt, *Result.Context))
309 if (isAtLeastOneCondVarChanged(Func, LoopStmt, Cond, Result.Context))
311 if (hasRecursionOverStaticLoopCondVariables(Cond, LoopStmt, Func,
320 diag(LoopStmt->getBeginLoc(),
324 diag(LoopStmt->getBeginLoc(),