clang-tools 20.0.0git
Namespaces | Functions
InfiniteLoopCheck.cpp File Reference
#include "InfiniteLoopCheck.h"
#include "../utils/Aliasing.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Analysis/Analyses/ExprMutationAnalyzer.h"
#include "clang/Analysis/CallGraph.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/ADT/SmallVector.h"

Go to the source code of this file.

Namespaces

namespace  clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
namespace  clang::ast_matchers
 
namespace  clang::tidy
 
namespace  clang::tidy::bugprone
 

Functions

 clang::ast_matchers::AST_MATCHER (Decl, declHasNoReturnAttr)
 matches a Decl if it has a "no return" attribute of any kind
 
 clang::ast_matchers::AST_MATCHER (FunctionType, typeHasNoReturnAttr)
 matches a FunctionType if the type includes the GNU no return attribute
 
static internal::Matcher< Stmt > clang::tidy::bugprone::loopEndingStmt (internal::Matcher< Stmt > Internal)
 
static bool clang::tidy::bugprone::isChanged (const Stmt *LoopStmt, const VarDecl *Var, ASTContext *Context)
 Return whether Var was changed in LoopStmt.
 
static bool clang::tidy::bugprone::isVarThatIsPossiblyChanged (const Decl *Func, const Stmt *LoopStmt, const Stmt *Cond, ASTContext *Context)
 Return whether Cond is a variable that is possibly changed in LoopStmt.
 
static bool clang::tidy::bugprone::isAtLeastOneCondVarChanged (const Decl *Func, const Stmt *LoopStmt, const Stmt *Cond, ASTContext *Context)
 Return whether at least one variable of Cond changed in LoopStmt.
 
static std::string clang::tidy::bugprone::getCondVarNames (const Stmt *Cond)
 Return the variable names in Cond.
 
static bool clang::tidy::bugprone::isKnownToHaveValue (const Expr &Cond, const ASTContext &Ctx, bool ExpectedValue)
 
static bool clang::tidy::bugprone::populateCallees (const Stmt *StmtNode, llvm::SmallSet< const Decl *, 16 > &Callees)
 populates the set Callees with all function (and objc method) declarations called in StmtNode if all visited call sites have resolved call targets.
 
static bool clang::tidy::bugprone::overlap (ArrayRef< CallGraphNode * > SCC, const llvm::SmallSet< const Decl *, 16 > &Callees, const Decl *Func)
 returns true iff SCC contains Func and its' function set overlaps with Callees
 
static bool clang::tidy::bugprone::hasStaticLocalVariable (const Stmt *Cond)
 returns true iff Cond involves at least one static local variable.
 
static bool clang::tidy::bugprone::hasRecursionOverStaticLoopCondVariables (const Expr *Cond, const Stmt *LoopStmt, const Decl *Func, const ASTContext *Ctx)
 Tests if the loop condition Cond involves static local variables and the enclosing function Func is recursive.