clang-tools 20.0.0git
Namespaces | Functions
DeclRefExprUtils.cpp File Reference
#include "DeclRefExprUtils.h"
#include "Matchers.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/ExprCXX.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include <cassert>

Go to the source code of this file.

Namespaces

namespace  clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
namespace  clang::tidy
 
namespace  clang::tidy::utils
 
namespace  clang::tidy::utils::decl_ref_expr
 

Functions

SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::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 a const fashion.
 
bool clang::tidy::utils::decl_ref_expr::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.
 
SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::allDeclRefExprs (const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context)
 Returns set of all DeclRefExprs to VarDecl within Stmt.
 
SmallPtrSet< const DeclRefExpr *, 16 > clang::tidy::utils::decl_ref_expr::allDeclRefExprs (const VarDecl &VarDecl, const Decl &Decl, ASTContext &Context)
 Returns set of all DeclRefExprs to VarDecl within Decl.
 
bool clang::tidy::utils::decl_ref_expr::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 clang::tidy::utils::decl_ref_expr::isCopyAssignmentArgument (const DeclRefExpr &DeclRef, const Decl &Decl, ASTContext &Context)
 Returns true if DeclRefExpr is the argument of a copy-assignment operator CallExpr within Decl.