clang  14.0.0git
Functions
RetainSummaryManager.cpp File Reference
#include "clang/Analysis/DomainSpecific/CocoaConventions.h"
#include "clang/Analysis/RetainSummaryManager.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/ParentMap.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
Include dependency graph for RetainSummaryManager.cpp:

Go to the source code of this file.

Functions

template<class T >
constexpr static bool isOneOf ()
 
template<class T , class P , class... ToCompare>
constexpr static bool isOneOf ()
 Helper function to check whether the class is one of the rest of varargs. More...
 
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. More...
 
static ArgEffect getStopTrackingHardEquivalent (ArgEffect E)
 
static bool hasTypedefNamed (QualType QT, StringRef Name)
 
static QualType getCallableReturnType (const NamedDecl *ND)
 

Function Documentation

◆ getCallableReturnType()

static QualType getCallableReturnType ( const NamedDecl ND)
static

Definition at line 904 of file RetainSummaryManager.cpp.

References clang::FunctionDecl::getReturnType().

◆ getStopTrackingHardEquivalent()

static ArgEffect getStopTrackingHardEquivalent ( ArgEffect  E)
static

◆ hasRCAnnotation()

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

◆ hasTypedefNamed()

static 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 893 of file RetainSummaryManager.cpp.

◆ isAutorelease()

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

◆ isExactClass()

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

◆ isISLObjectRef()

static bool isISLObjectRef ( QualType  Ty)
static

Definition at line 175 of file RetainSummaryManager.cpp.

References clang::QualType::getAsString().

◆ isMakeCollectable()

static bool isMakeCollectable ( StringRef  FName)
static

◆ isOneOf() [1/2]

template<class T >
constexpr static bool isOneOf ( )
staticconstexpr

Definition at line 27 of file RetainSummaryManager.cpp.

Referenced by isOneOf().

◆ isOneOf() [2/2]

template<class T , class P , class... ToCompare>
constexpr static 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().

◆ isOSIteratorSubclass()

static bool isOSIteratorSubclass ( const Decl D)
static

Definition at line 179 of file RetainSummaryManager.cpp.

References isSubclass().

◆ isOSObjectDynamicCast()

static bool isOSObjectDynamicCast ( StringRef  S)
static

◆ isOSObjectPtr()

static bool isOSObjectPtr ( QualType  QT)
static

◆ isOSObjectRelated()

static 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 212 of file RetainSummaryManager.cpp.

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

◆ isOSObjectRequiredCast()

static bool isOSObjectRequiredCast ( StringRef  S)
static

◆ isOSObjectSubclass()

static bool isOSObjectSubclass ( const Decl D)
static

◆ isOSObjectThisCast()

static bool isOSObjectThisCast ( StringRef  S)
static

◆ isRelease()

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

Definition at line 196 of file RetainSummaryManager.cpp.

◆ isRetain()

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

◆ isSubclass()

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