clang 20.0.0git
|
#include "clang/Analysis/RetainSummaryManager.h"
Public Types | |
enum class | BehaviorSummary { NoOp , Identity , IdentityThis , IdentityOrZero } |
Public Member Functions | |
RetainSummaryManager (ASTContext &ctx, bool trackObjCAndCFObjects, bool trackOSObjects) | |
std::optional< BehaviorSummary > | canEval (const CallExpr *CE, const FunctionDecl *FD, bool &hasTrustedImplementationAnnotation) |
bool | isTrustedReferenceCountImplementation (const Decl *FD) |
const RetainSummary * | getSummary (AnyCall C, bool HasNonZeroCallbackArg=false, bool IsReceiverUnconsumedSelf=false, QualType ReceiverType={}) |
RetEffect | getObjAllocRetEffect () const |
Static Public Member Functions | |
static bool | isKnownSmartPointer (QualType QT) |
Friends | |
class | RetainSummaryTemplate |
Definition at line 450 of file RetainSummaryManager.h.
|
strong |
Enumerator | |
---|---|
NoOp | |
Identity | |
IdentityThis | |
IdentityOrZero |
Definition at line 638 of file RetainSummaryManager.h.
|
inline |
Definition at line 625 of file RetainSummaryManager.h.
References bool.
std::optional< RetainSummaryManager::BehaviorSummary > RetainSummaryManager::canEval | ( | const CallExpr * | CE, |
const FunctionDecl * | FD, | ||
bool & | hasTrustedImplementationAnnotation | ||
) |
Definition at line 719 of file RetainSummaryManager.cpp.
References clang::CallExpr::getCallReturnType(), clang::FunctionDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), clang::CallExpr::getNumArgs(), Identity, IdentityOrZero, IdentityThis, isAutorelease(), isMakeCollectable(), clang::Type::isObjCIdType(), isOSObjectDynamicCast(), isOSObjectRequiredCast(), isOSObjectSubclass(), isOSObjectThisCast(), clang::Type::isPointerType(), clang::ento::cocoa::isRefType(), isRetain(), clang::IdentifierInfo::isStr(), isTrustedReferenceCountImplementation(), NoOp, clang::FunctionDecl::param_size(), and Parent.
Referenced by clang::ento::retaincountchecker::RetainCountChecker::evalCall().
|
inline |
Definition at line 667 of file RetainSummaryManager.h.
Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkSummary().
const RetainSummary * RetainSummaryManager::getSummary | ( | AnyCall | C, |
bool | HasNonZeroCallbackArg = false , |
||
bool | IsReceiverUnconsumedSelf = false , |
||
QualType | ReceiverType = {} |
||
) |
Definition at line 662 of file RetainSummaryManager.cpp.
References clang::AnyCall::Allocator, clang::AnyCall::Block, clang::C, clang::AnyCall::Constructor, clang::AnyCall::Deallocator, clang::AnyCall::Destructor, clang::AnyCall::Function, clang::AnyCall::InheritedConstructor, and clang::AnyCall::ObjCMethod.
Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkBeginFunction(), and getSummary().
Definition at line 229 of file RetainSummaryManager.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::QualType::getCanonicalType(), and clang::IdentifierInfo::getName().
Referenced by isSmartPtrField().
Definition at line 713 of file RetainSummaryManager.cpp.
References hasRCAnnotation().
Referenced by canEval(), and clang::ento::retaincountchecker::RetainCountChecker::checkBeginFunction().
|
friend |
Definition at line 733 of file RetainSummaryManager.h.