clang-tools
3.9.0
|
Functions | |
SmallPtrSet< const DeclRefExpr *, 16 > | constReferenceDeclRefExprs (const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context) |
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) |
bool | isCopyConstructorArgument (const DeclRefExpr &DeclRef, const Stmt &Stmt, ASTContext &Context) |
bool | isCopyAssignmentArgument (const DeclRefExpr &DeclRef, const Stmt &Stmt, ASTContext &Context) |
llvm::SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::allDeclRefExprs | ( | const VarDecl & | VarDecl, |
const Stmt & | Stmt, | ||
ASTContext & | Context | ||
) |
Definition at line 87 of file DeclRefExprUtils.cpp.
Referenced by clang::tidy::performance::UnnecessaryValueParamCheck::check(), and isOnlyUsedAsConst().
llvm::SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::constReferenceDeclRefExprs | ( | const VarDecl & | VarDecl, |
const Stmt & | Stmt, | ||
ASTContext & | Context | ||
) |
Definition at line 46 of file DeclRefExprUtils.cpp.
Referenced by clang::tidy::performance::UnnecessaryValueParamCheck::check(), and isOnlyUsedAsConst().
bool clang::tidy::utils::decl_ref_expr::isCopyAssignmentArgument | ( | const DeclRefExpr & | DeclRef, |
const Stmt & | Stmt, | ||
ASTContext & | Context | ||
) |
Definition at line 110 of file DeclRefExprUtils.cpp.
Referenced by clang::tidy::performance::UnnecessaryValueParamCheck::check().
bool clang::tidy::utils::decl_ref_expr::isCopyConstructorArgument | ( | const DeclRefExpr & | DeclRef, |
const Stmt & | Stmt, | ||
ASTContext & | Context | ||
) |
Definition at line 96 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 74 of file DeclRefExprUtils.cpp.
References allDeclRefExprs(), and constReferenceDeclRefExprs().