|
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 | VisitConditionalOperator (const ConditionalOperator *CO) |
| 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 74 of file FactsGenerator.cpp.
References clang::Block, clang::CFGElement::getAs(), clang::CFG::getEntry(), 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 276 of file FactsGenerator.cpp.
References clang::BinaryOperator::getLHS(), clang::BinaryOperator::getRHS(), clang::BinaryOperator::isAssignmentOp(), and clang::BinaryOperator::isCompoundAssignmentOp().
| void clang::lifetimes::internal::FactsGenerator::VisitCallExpr | ( | const CallExpr * | CE | ) |
Definition at line 183 of file FactsGenerator.cpp.
References clang::CallExpr::getDirectCallee().
Referenced by VisitCXXOperatorCallExpr().
| void clang::lifetimes::internal::FactsGenerator::VisitConditionalOperator | ( | const ConditionalOperator * | CO | ) |
Definition at line 286 of file FactsGenerator.cpp.
References clang::ConditionalOperator::getFalseExpr(), clang::ConditionalOperator::getTrueExpr(), and clang::lifetimes::internal::hasOrigins().
| void clang::lifetimes::internal::FactsGenerator::VisitCXXConstructExpr | ( | const CXXConstructExpr * | CCE | ) |
Definition at line 153 of file FactsGenerator.cpp.
References clang::Expr::getType(), and clang::lifetimes::isGslPointerType().
| void clang::lifetimes::internal::FactsGenerator::VisitCXXFunctionalCastExpr | ( | const CXXFunctionalCastExpr * | FCE | ) |
Definition at line 306 of file FactsGenerator.cpp.
References clang::CastExpr::getSubExpr(), clang::Expr::getType(), and clang::lifetimes::isGslPointerType().
| void clang::lifetimes::internal::FactsGenerator::VisitCXXMemberCallExpr | ( | const CXXMemberCallExpr * | MCE | ) |
Definition at line 160 of file FactsGenerator.cpp.
References clang::CallExpr::getArgs(), clang::CallExpr::getCalleeDecl(), clang::CXXMemberCallExpr::getImplicitObjectArgument(), clang::CXXMemberCallExpr::getMethodDecl(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), clang::lifetimes::isGslOwnerType(), clang::lifetimes::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 188 of file FactsGenerator.cpp.
| void clang::lifetimes::internal::FactsGenerator::VisitCXXOperatorCallExpr | ( | const CXXOperatorCallExpr * | OCE | ) |
Definition at line 295 of file FactsGenerator.cpp.
References clang::CallExpr::getArg(), clang::CallExpr::getNumArgs(), clang::CXXOperatorCallExpr::getOperator(), clang::Expr::getType(), clang::lifetimes::internal::hasOrigins(), and VisitCallExpr().
| void clang::lifetimes::internal::FactsGenerator::VisitDeclRefExpr | ( | const DeclRefExpr * | DRE | ) |
Definition at line 126 of file FactsGenerator.cpp.
References clang::lifetimes::internal::createLoan(), clang::lifetimes::internal::doesDeclHaveStorage(), clang::DeclRefExpr::getDecl(), clang::DeclRefExpr::getFoundDecl(), clang::lifetimes::internal::Loan::getID(), clang::lifetimes::internal::OriginList::getOuterOriginID(), clang::Decl::isFunctionOrFunctionTemplate(), and clang::Expr::isGLValue().
| void clang::lifetimes::internal::FactsGenerator::VisitDeclStmt | ( | const DeclStmt * | DS | ) |
Definition at line 113 of file FactsGenerator.cpp.
References clang::DeclStmt::decls().
| void clang::lifetimes::internal::FactsGenerator::VisitImplicitCastExpr | ( | const ImplicitCastExpr * | ICE | ) |
Definition at line 195 of file FactsGenerator.cpp.
References clang::CastExpr::getCastKind(), clang::lifetimes::internal::getRValueOrigins(), clang::CastExpr::getSubExpr(), and clang::Expr::isLValue().
| void clang::lifetimes::internal::FactsGenerator::VisitInitListExpr | ( | const InitListExpr * | ILE | ) |
Definition at line 316 of file FactsGenerator.cpp.
References clang::InitListExpr::getInit(), clang::InitListExpr::getNumInits(), and clang::lifetimes::internal::hasOrigins().
| void clang::lifetimes::internal::FactsGenerator::VisitMaterializeTemporaryExpr | ( | const MaterializeTemporaryExpr * | MTE | ) |
Definition at line 325 of file FactsGenerator.cpp.
References clang::lifetimes::internal::OriginList::getLength(), clang::lifetimes::internal::getRValueOrigins(), clang::MaterializeTemporaryExpr::getSubExpr(), clang::Expr::isGLValue(), and clang::Expr::isXValue().
| void clang::lifetimes::internal::FactsGenerator::VisitReturnStmt | ( | const ReturnStmt * | RS | ) |
Definition at line 245 of file FactsGenerator.cpp.
References clang::ReturnStmt::getRetValue(), and clang::lifetimes::internal::OriginList::peelOuterOrigin().
| void clang::lifetimes::internal::FactsGenerator::VisitUnaryOperator | ( | const UnaryOperator * | UO | ) |
Definition at line 234 of file FactsGenerator.cpp.
References clang::UnaryOperator::getOpcode(), and clang::UnaryOperator::getSubExpr().