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>
33 allDeclRefExprs(
const VarDecl &VarDecl,
const Stmt &Stmt, ASTContext &Context);
36 llvm::SmallPtrSet<const DeclRefExpr *, 16>
37 allDeclRefExprs(
const VarDecl &VarDecl,
const Decl &Decl, ASTContext &Context);
41 llvm::SmallPtrSet<const DeclRefExpr *, 16>
47 llvm::SmallPtrSet<const DeclRefExpr *, 16>
66 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_DECLREFEXPRUTILS_H 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)
Returns true if all DeclRefExpr to the variable within Stmt do not modify it.
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 ...
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
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...
const DeclRefExpr * DeclRef