clang 22.0.0git
RetainSummaryManager.cpp File Reference

Go to the source code of this file.

Functions

template<class T>
static constexpr bool isOneOf ()
template<class T, class P, class... ToCompare>
static constexpr bool isOneOf ()
 Helper function to check whether the class is one of the rest of varargs.
static bool isSubclass (const Decl *D, StringRef ClassName)
static bool isExactClass (const Decl *D, StringRef ClassName)
static bool isOSObjectSubclass (const Decl *D)
static bool isOSObjectDynamicCast (StringRef S)
static bool isOSObjectRequiredCast (StringRef S)
static bool isOSObjectThisCast (StringRef S)
static bool isOSObjectPtr (QualType QT)
static bool isISLObjectRef (QualType Ty)
static bool isOSIteratorSubclass (const Decl *D)
static bool hasRCAnnotation (const Decl *D, StringRef rcAnnotation)
static bool isRetain (const FunctionDecl *FD, StringRef FName)
static bool isRelease (const FunctionDecl *FD, StringRef FName)
static bool isAutorelease (const FunctionDecl *FD, StringRef FName)
static bool isMakeCollectable (StringRef FName)
static bool isOSObjectRelated (const CXXMethodDecl *MD)
 A function is OSObject related if it is declared on a subclass of OSObject, or any of the parameters is a subclass of an OSObject.
static ArgEffect getStopTrackingHardEquivalent (ArgEffect E)
static bool hasTypedefNamed (QualType QT, StringRef Name)
static QualType getCallableReturnType (const NamedDecl *ND)

Function Documentation

◆ getCallableReturnType()

QualType getCallableReturnType ( const NamedDecl * ND)
static

Definition at line 899 of file RetainSummaryManager.cpp.

References clang::FunctionDecl::getReturnType().

◆ getStopTrackingHardEquivalent()

◆ hasRCAnnotation()

bool hasRCAnnotation ( const Decl * D,
StringRef rcAnnotation )
static

◆ hasTypedefNamed()

bool hasTypedefNamed ( QualType QT,
StringRef Name )
static
Returns
Whether the chain of typedefs starting from QT has a typedef with a given name Name.

Definition at line 888 of file RetainSummaryManager.cpp.

References clang::Type::getAs(), and clang::T.

◆ isAutorelease()

bool isAutorelease ( const FunctionDecl * FD,
StringRef FName )
static

◆ isExactClass()

bool isExactClass ( const Decl * D,
StringRef ClassName )
static

◆ isISLObjectRef()

bool isISLObjectRef ( QualType Ty)
static

Definition at line 174 of file RetainSummaryManager.cpp.

References clang::QualType::getAsString().

◆ isMakeCollectable()

bool isMakeCollectable ( StringRef FName)
static

◆ isOneOf() [1/2]

template<class T>
constexpr bool isOneOf ( )
staticconstexpr

Definition at line 27 of file RetainSummaryManager.cpp.

Referenced by clang::format::FormatToken::isIf(), and isOneOf().

◆ isOneOf() [2/2]

template<class T, class P, class... ToCompare>
constexpr bool isOneOf ( )
staticconstexpr

Helper function to check whether the class is one of the rest of varargs.

Definition at line 34 of file RetainSummaryManager.cpp.

References isOneOf(), and clang::T.

◆ isOSIteratorSubclass()

bool isOSIteratorSubclass ( const Decl * D)
static

Definition at line 178 of file RetainSummaryManager.cpp.

References isSubclass().

◆ isOSObjectDynamicCast()

bool isOSObjectDynamicCast ( StringRef S)
static

◆ isOSObjectPtr()

bool isOSObjectPtr ( QualType QT)
static

◆ isOSObjectRelated()

bool isOSObjectRelated ( const CXXMethodDecl * MD)
static

A function is OSObject related if it is declared on a subclass of OSObject, or any of the parameters is a subclass of an OSObject.

Definition at line 211 of file RetainSummaryManager.cpp.

References clang::Type::getAsCXXRecordDecl(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::QualType::isNull(), isOSObjectSubclass(), and clang::FunctionDecl::parameters().

◆ isOSObjectRequiredCast()

bool isOSObjectRequiredCast ( StringRef S)
static

◆ isOSObjectSubclass()

bool isOSObjectSubclass ( const Decl * D)
static

◆ isOSObjectThisCast()

bool isOSObjectThisCast ( StringRef S)
static

◆ isRelease()

bool isRelease ( const FunctionDecl * FD,
StringRef FName )
static

Definition at line 195 of file RetainSummaryManager.cpp.

◆ isRetain()

bool isRetain ( const FunctionDecl * FD,
StringRef FName )
static

◆ isSubclass()

bool isSubclass ( const Decl * D,
StringRef ClassName )
static