10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_DECLREFEXPRUTILS_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_DECLREFEXPRUTILS_H
13 #include "clang/AST/ASTContext.h"
14 #include "clang/AST/Type.h"
15 #include "llvm/ADT/SmallPtrSet.h"
20 namespace decl_ref_expr {
32 llvm::SmallPtrSet<const DeclRefExpr *, 16>
37 llvm::SmallPtrSet<const DeclRefExpr *, 16>
55 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_DECLREFEXPRUTILS_H
SmallPtrSet< const DeclRefExpr *, 16 > allDeclRefExprs(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.
bool isCopyAssignmentArgument(const DeclRefExpr &DeclRef, const Stmt &Stmt, ASTContext &Context)
bool isCopyConstructorArgument(const DeclRefExpr &DeclRef, const Stmt &Stmt, ASTContext &Context)
SmallPtrSet< const DeclRefExpr *, 16 > constReferenceDeclRefExprs(const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context)
ClangTidyContext & Context