clang-tools  3.9.0
Functions
clang::tidy::utils::decl_ref_expr Namespace Reference

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)
 

Function Documentation

llvm::SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::allDeclRefExprs ( const VarDecl &  VarDecl,
const Stmt &  Stmt,
ASTContext &  Context 
)
llvm::SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::constReferenceDeclRefExprs ( const VarDecl &  VarDecl,
const Stmt &  Stmt,
ASTContext &  Context 
)
bool clang::tidy::utils::decl_ref_expr::isCopyAssignmentArgument ( const DeclRefExpr &  DeclRef,
const Stmt &  Stmt,
ASTContext &  Context 
)
bool clang::tidy::utils::decl_ref_expr::isCopyConstructorArgument ( const DeclRefExpr &  DeclRef,
const Stmt &  Stmt,
ASTContext &  Context 
)
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().