clang-tools
9.0.0
|
Functions | |
SmallPtrSet< const DeclRefExpr *, 16 > | constReferenceDeclRefExprs (const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context) |
Returns set of all DeclRefExprs to VarDecl within Stmt where VarDecl is guaranteed to be accessed in a const fashion. More... | |
SmallPtrSet< const DeclRefExpr *, 16 > | constReferenceDeclRefExprs (const VarDecl &VarDecl, const Decl &Decl, ASTContext &Context) |
Returns set of all DeclRefExprs to VarDecl within Decl where VarDecl is guaranteed to be accessed in a const fashion. More... | |
bool | isOnlyUsedAsConst (const VarDecl &Var, const Stmt &Stmt, ASTContext &Context) |
Returns true if all DeclRefExpr to the variable within Stmt do not modify it. More... | |
SmallPtrSet< const DeclRefExpr *, 16 > | allDeclRefExprs (const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context) |
Returns set of all DeclRefExprs to VarDecl within Stmt . More... | |
SmallPtrSet< const DeclRefExpr *, 16 > | allDeclRefExprs (const VarDecl &VarDecl, const Decl &Decl, ASTContext &Context) |
Returns set of all DeclRefExprs to VarDecl within Decl . More... | |
bool | isCopyConstructorArgument (const DeclRefExpr &DeclRef, const Decl &Decl, ASTContext &Context) |
Returns true if DeclRefExpr is the argument of a copy-constructor call expression within Decl . More... | |
bool | isCopyAssignmentArgument (const DeclRefExpr &DeclRef, const Decl &Decl, ASTContext &Context) |
Returns true if DeclRefExpr is the argument of a copy-assignment operator CallExpr within Decl . More... | |
llvm::SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::allDeclRefExprs | ( | const VarDecl & | VarDecl, |
const Stmt & | Stmt, | ||
ASTContext & | Context | ||
) |
Returns set of all DeclRefExprs
to VarDecl
within Stmt
.
Definition at line 120 of file DeclRefExprUtils.cpp.
Referenced by clang::tidy::performance::ForRangeCopyCheck::check(), and clang::tidy::performance::UnnecessaryValueParamCheck::check().
llvm::SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::allDeclRefExprs | ( | const VarDecl & | VarDecl, |
const Decl & | Decl, | ||
ASTContext & | Context | ||
) |
Returns set of all DeclRefExprs
to VarDecl
within Decl
.
Definition at line 130 of file DeclRefExprUtils.cpp.
llvm::SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::constReferenceDeclRefExprs | ( | const VarDecl & | VarDecl, |
const Stmt & | Stmt, | ||
ASTContext & | Context | ||
) |
Returns set of all DeclRefExprs
to VarDecl
within Stmt
where VarDecl
is guaranteed to be accessed in a const fashion.
Definition at line 45 of file DeclRefExprUtils.cpp.
llvm::SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::constReferenceDeclRefExprs | ( | const VarDecl & | VarDecl, |
const Decl & | Decl, | ||
ASTContext & | Context | ||
) |
Returns set of all DeclRefExprs
to VarDecl
within Decl
where VarDecl
is guaranteed to be accessed in a const fashion.
Definition at line 76 of file DeclRefExprUtils.cpp.
bool clang::tidy::utils::decl_ref_expr::isCopyAssignmentArgument | ( | const DeclRefExpr & | DeclRef, |
const Decl & | Decl, | ||
ASTContext & | Context | ||
) |
Returns true
if DeclRefExpr
is the argument of a copy-assignment operator CallExpr within Decl
.
Definition at line 154 of file DeclRefExprUtils.cpp.
Referenced by clang::tidy::performance::UnnecessaryValueParamCheck::check().
bool clang::tidy::utils::decl_ref_expr::isCopyConstructorArgument | ( | const DeclRefExpr & | DeclRef, |
const Decl & | Decl, | ||
ASTContext & | Context | ||
) |
Returns true
if DeclRefExpr
is the argument of a copy-constructor call expression within Decl
.
Definition at line 140 of file DeclRefExprUtils.cpp.
Referenced by clang::tidy::performance::UnnecessaryValueParamCheck::check().
bool clang::tidy::utils::decl_ref_expr::isOnlyUsedAsConst | ( | const VarDecl & | Var, |
const Stmt & | Stmt, | ||
ASTContext & | Context | ||
) |
Returns true if all DeclRefExpr
to the variable within Stmt
do not modify it.
Returns true
if only const methods or operators are called on the variable or the variable is a const reference or value argument to a callExpr()
.
Definition at line 107 of file DeclRefExprUtils.cpp.
Referenced by clang::tidy::performance::UnnecessaryCopyInitialization::check().