9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_DECLREFEXPRUTILS_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_DECLREFEXPRUTILS_H
12#include "clang/AST/ASTContext.h"
13#include "clang/AST/Type.h"
14#include "llvm/ADT/SmallPtrSet.h"
19llvm::SmallPtrSet<const DeclRefExpr *, 16>
20allDeclRefExprs(
const VarDecl &VarDecl,
const Stmt &Stmt, ASTContext &Context);
23llvm::SmallPtrSet<const DeclRefExpr *, 16>
44llvm::SmallPtrSet<const DeclRefExpr *, 16>
46 ASTContext &Context,
int Indirections);
52 ASTContext &Context,
int Indirections);
const FunctionDecl * Decl
const DeclRefExpr * DeclRef
SmallPtrSet< const DeclRefExpr *, 16 > allDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context)
Returns set of all DeclRefExprs to VarDecl within Stmt.
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.
bool isOnlyUsedAsConst(const VarDecl &Var, const Stmt &Stmt, ASTContext &Context, int Indirections)
Returns true if all DeclRefExpr to the variable within Stmt do not modify it.
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.
SmallPtrSet< const DeclRefExpr *, 16 > constReferenceDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context, int Indirections)
Returns set of all DeclRefExprs to VarDecl within Stmt where VarDecl is guaranteed to be accessed in ...