|
clang-tools 22.0.0git
|
Functions | |
| template<typename S> | |
| static bool | isSetDifferenceEmpty (const S &S1, const S &S2) |
| template<typename Node> | |
| static void | extractNodesByIdTo (ArrayRef< BoundNodes > Matches, StringRef ID, SmallPtrSet< const Node *, 16 > &Nodes) |
| static bool | isSameTypeIgnoringConst (QualType A, QualType B) |
| static bool | hasSameParameterTypes (const CXXMethodDecl &D, const CXXMethodDecl &O) |
| static const CXXMethodDecl * | findConstOverload (const CXXMethodDecl &D) |
| static bool | pointsToSameTypeIgnoringConst (QualType A, QualType B) |
| static bool | isLikelyShallowConst (const CXXMethodDecl &M) |
| 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 a const fashion. | |
| 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. See constReferenceDeclRefExprs for the meaning of Indirections. | |
| SmallPtrSet< const DeclRefExpr *, 16 > | allDeclRefExprs (const VarDecl &VarDecl, const Stmt &Stmt, ASTContext &Context) |
| Returns set of all DeclRefExprs to VarDecl within Stmt. | |
| SmallPtrSet< const DeclRefExpr *, 16 > | allDeclRefExprs (const VarDecl &VarDecl, const Decl &Decl, ASTContext &Context) |
| Returns set of all DeclRefExprs to VarDecl within Decl. | |
| 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 | isCopyAssignmentArgument (const DeclRefExpr &DeclRef, const Decl &Decl, ASTContext &Context) |
| Returns true if DeclRefExpr is the argument of a copy-assignment operator CallExpr within Decl. | |
| llvm::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.
Definition at line 384 of file DeclRefExprUtils.cpp.
References allDeclRefExprs(), and extractNodesByIdTo().
| llvm::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.
Definition at line 374 of file DeclRefExprUtils.cpp.
References allDeclRefExprs(), and extractNodesByIdTo().
Referenced by allDeclRefExprs(), allDeclRefExprs(), clang::tidy::performance::InefficientVectorOperationCheck::check(), clang::tidy::performance::UnnecessaryValueParamCheck::check(), and isOnlyUsedAsConst().
| llvm::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.
If VarDecl is of pointer type, Indirections specifies the level of indirection of the object whose mutations we are tracking.
For example, given:
constReferenceDeclRefExprs(P, Stmt, Context, 1) returns the reference
Definition at line 348 of file DeclRefExprUtils.cpp.
References constReferenceDeclRefExprs(), and extractNodesByIdTo().
Referenced by constReferenceDeclRefExprs(), and isOnlyUsedAsConst().
|
static |
Definition at line 29 of file DeclRefExprUtils.cpp.
Referenced by allDeclRefExprs(), allDeclRefExprs(), and constReferenceDeclRefExprs().
|
static |
Definition at line 60 of file DeclRefExprUtils.cpp.
References hasSameParameterTypes().
Referenced by isLikelyShallowConst().
|
static |
Definition at line 46 of file DeclRefExprUtils.cpp.
References isSameTypeIgnoringConst().
Referenced by findConstOverload().
| 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.
Definition at line 408 of file DeclRefExprUtils.cpp.
References isCopyAssignmentArgument().
Referenced by clang::tidy::performance::UnnecessaryValueParamCheck::check(), and isCopyAssignmentArgument().
| 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.
Definition at line 394 of file DeclRefExprUtils.cpp.
References isCopyConstructorArgument().
Referenced by clang::tidy::performance::UnnecessaryValueParamCheck::check(), and isCopyConstructorArgument().
|
static |
Definition at line 122 of file DeclRefExprUtils.cpp.
References findConstOverload(), isSameTypeIgnoringConst(), and pointsToSameTypeIgnoringConst().
| 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. See constReferenceDeclRefExprs for the meaning of Indirections.
Definition at line 360 of file DeclRefExprUtils.cpp.
References allDeclRefExprs(), constReferenceDeclRefExprs(), isOnlyUsedAsConst(), and isSetDifferenceEmpty().
Referenced by isOnlyUsedAsConst().
|
static |
Definition at line 37 of file DeclRefExprUtils.cpp.
Referenced by hasSameParameterTypes(), isLikelyShallowConst(), and pointsToSameTypeIgnoringConst().
|
static |
Definition at line 23 of file DeclRefExprUtils.cpp.
Referenced by isOnlyUsedAsConst().
|
static |
Definition at line 81 of file DeclRefExprUtils.cpp.
References isSameTypeIgnoringConst().
Referenced by isLikelyShallowConst().