clang 22.0.0git
|
#include "clang/Analysis/Analyses/LifetimeSafety/FactsGenerator.h"
Public Member Functions | |
FactsGenerator (FactManager &FactMgr, AnalysisDeclContext &AC) | |
void | run () |
void | VisitDeclStmt (const DeclStmt *DS) |
void | VisitDeclRefExpr (const DeclRefExpr *DRE) |
void | VisitCXXConstructExpr (const CXXConstructExpr *CCE) |
void | VisitCXXMemberCallExpr (const CXXMemberCallExpr *MCE) |
void | VisitCallExpr (const CallExpr *CE) |
void | VisitCXXNullPtrLiteralExpr (const CXXNullPtrLiteralExpr *N) |
void | VisitImplicitCastExpr (const ImplicitCastExpr *ICE) |
void | VisitUnaryOperator (const UnaryOperator *UO) |
void | VisitReturnStmt (const ReturnStmt *RS) |
void | VisitBinaryOperator (const BinaryOperator *BO) |
void | VisitCXXOperatorCallExpr (const CXXOperatorCallExpr *OCE) |
void | VisitCXXFunctionalCastExpr (const CXXFunctionalCastExpr *FCE) |
void | VisitInitListExpr (const InitListExpr *ILE) |
void | VisitMaterializeTemporaryExpr (const MaterializeTemporaryExpr *MTE) |
Public Member Functions inherited from clang::StmtVisitorBase< Ptr, ImplClass, RetTy, ParamTys > | |
RetTy | Visit (PTR(Stmt) S, ParamTys... P) |
BINOP_FALLBACK (PtrMemD) BINOP_FALLBACK(PtrMemI) BINOP_FALLBACK(Mul) BINOP_FALLBACK(Div) BINOP_FALLBACK(Rem) BINOP_FALLBACK(Add) BINOP_FALLBACK(Sub) BINOP_FALLBACK(Shl) BINOP_FALLBACK(LT) BINOP_FALLBACK(GT) BINOP_FALLBACK(LE) BINOP_FALLBACK(GE) BINOP_FALLBACK(EQ) BINOP_FALLBACK(NE) BINOP_FALLBACK(And) BINOP_FALLBACK(Xor) BINOP_FALLBACK(Or) BINOP_FALLBACK(LAnd) BINOP_FALLBACK(LOr) CAO_FALLBACK(MulAssign) CAO_FALLBACK(DivAssign) CAO_FALLBACK(RemAssign) CAO_FALLBACK(AddAssign) CAO_FALLBACK(SubAssign) CAO_FALLBACK(ShlAssign) CAO_FALLBACK(ShrAssign) CAO_FALLBACK(AndAssign) CAO_FALLBACK(OrAssign) UNARYOP_FALLBACK(PostInc) UNARYOP_FALLBACK(PostDec) UNARYOP_FALLBACK(PreInc) UNARYOP_FALLBACK(PreDec) UNARYOP_FALLBACK(AddrOf) UNARYOP_FALLBACK(Deref) UNARYOP_FALLBACK(Plus) UNARYOP_FALLBACK(Minus) UNARYOP_FALLBACK(Not) UNARYOP_FALLBACK(LNot) UNARYOP_FALLBACK(Real) UNARYOP_FALLBACK(Imag) UNARYOP_FALLBACK(Extension) UNARYOP_FALLBACK(Coawait) RetTy VisitStmt(PTR(Stmt) Node |
Additional Inherited Members | |
Public Attributes inherited from clang::StmtVisitorBase< Ptr, ImplClass, RetTy, ParamTys > | |
ParamTys | P { return RetTy() |
Definition at line 27 of file FactsGenerator.h.
|
inline |
Definition at line 31 of file FactsGenerator.h.
void clang::lifetimes::internal::FactsGenerator::run | ( | ) |
Definition at line 53 of file FactsGenerator.cpp.
References clang::Block, clang::CFGElement::getAs(), and clang::StmtVisitorBase< Ptr, ImplClass, RetTy, ParamTys >::Visit().
Referenced by clang::lifetimes::internal::LifetimeSafetyAnalysis::run().
void clang::lifetimes::internal::FactsGenerator::VisitBinaryOperator | ( | const BinaryOperator * | BO | ) |
Definition at line 172 of file FactsGenerator.cpp.
References clang::BinaryOperator::getLHS(), clang::BinaryOperator::getRHS(), and clang::BinaryOperator::isAssignmentOp().
void clang::lifetimes::internal::FactsGenerator::VisitCallExpr | ( | const CallExpr * | CE | ) |
Definition at line 128 of file FactsGenerator.cpp.
References clang::CallExpr::getDirectCallee().
void clang::lifetimes::internal::FactsGenerator::VisitCXXConstructExpr | ( | const CXXConstructExpr * | CCE | ) |
Definition at line 100 of file FactsGenerator.cpp.
References clang::Expr::getType(), and clang::lifetimes::internal::isGslPointerType().
void clang::lifetimes::internal::FactsGenerator::VisitCXXFunctionalCastExpr | ( | const CXXFunctionalCastExpr * | FCE | ) |
Definition at line 189 of file FactsGenerator.cpp.
References clang::CastExpr::getSubExpr(), clang::Expr::getType(), and clang::lifetimes::internal::isGslPointerType().
void clang::lifetimes::internal::FactsGenerator::VisitCXXMemberCallExpr | ( | const CXXMemberCallExpr * | MCE | ) |
Definition at line 107 of file FactsGenerator.cpp.
References clang::CallExpr::getArgs(), clang::CallExpr::getCalleeDecl(), clang::CXXMemberCallExpr::getImplicitObjectArgument(), clang::CXXMemberCallExpr::getMethodDecl(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), clang::isa(), clang::lifetimes::internal::isGslPointerType(), and clang::Method.
void clang::lifetimes::internal::FactsGenerator::VisitCXXNullPtrLiteralExpr | ( | const CXXNullPtrLiteralExpr * | N | ) |
TODO: Handle nullptr expr as a special 'null' loan. Uninitialized pointers can use the same type of loan.
Definition at line 133 of file FactsGenerator.cpp.
void clang::lifetimes::internal::FactsGenerator::VisitCXXOperatorCallExpr | ( | const CXXOperatorCallExpr * | OCE | ) |
Definition at line 177 of file FactsGenerator.cpp.
References clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::CallExpr::getNumArgs(), and clang::CXXOperatorCallExpr::isAssignmentOp().
void clang::lifetimes::internal::FactsGenerator::VisitDeclRefExpr | ( | const DeclRefExpr * | DRE | ) |
Definition at line 79 of file FactsGenerator.cpp.
References clang::lifetimes::internal::createLoan(), clang::Expr::getType(), and clang::lifetimes::internal::isPointerType().
void clang::lifetimes::internal::FactsGenerator::VisitDeclStmt | ( | const DeclStmt * | DS | ) |
Definition at line 71 of file FactsGenerator.cpp.
References clang::DeclStmt::decls(), and clang::lifetimes::internal::hasOrigin().
void clang::lifetimes::internal::FactsGenerator::VisitImplicitCastExpr | ( | const ImplicitCastExpr * | ICE | ) |
Definition at line 140 of file FactsGenerator.cpp.
References clang::CastExpr::getSubExpr(), and clang::lifetimes::internal::hasOrigin().
void clang::lifetimes::internal::FactsGenerator::VisitInitListExpr | ( | const InitListExpr * | ILE | ) |
Definition at line 199 of file FactsGenerator.cpp.
References clang::InitListExpr::getInit(), clang::InitListExpr::getNumInits(), and clang::lifetimes::internal::hasOrigin().
void clang::lifetimes::internal::FactsGenerator::VisitMaterializeTemporaryExpr | ( | const MaterializeTemporaryExpr * | MTE | ) |
Definition at line 208 of file FactsGenerator.cpp.
References clang::MaterializeTemporaryExpr::getSubExpr(), and clang::lifetimes::internal::hasOrigin().
void clang::lifetimes::internal::FactsGenerator::VisitReturnStmt | ( | const ReturnStmt * | RS | ) |
Definition at line 163 of file FactsGenerator.cpp.
References clang::ReturnStmt::getRetValue(), and clang::lifetimes::internal::hasOrigin().
void clang::lifetimes::internal::FactsGenerator::VisitUnaryOperator | ( | const UnaryOperator * | UO | ) |
Definition at line 148 of file FactsGenerator.cpp.
References clang::UnaryOperator::getOpcode(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), and clang::lifetimes::internal::isPointerType().