clang  10.0.0svn
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 >
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. More...
 
static bool isSubclass (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)
 

Function Documentation

◆ getStopTrackingHardEquivalent()

static ArgEffect getStopTrackingHardEquivalent ( ArgEffect  E)
static

◆ hasRCAnnotation()

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

Definition at line 176 of file RetainSummaryManager.cpp.

References clang::Decl::specific_attrs().

◆ isAutorelease()

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

Definition at line 192 of file RetainSummaryManager.cpp.

Referenced by isOSObjectRelated().

◆ isISLObjectRef()

static bool isISLObjectRef ( QualType  Ty)
static

Definition at line 168 of file RetainSummaryManager.cpp.

References clang::QualType::getAsString().

◆ isMakeCollectable()

static bool isMakeCollectable ( StringRef  FName)
static

Definition at line 197 of file RetainSummaryManager.cpp.

Referenced by isOSObjectRelated().

◆ isOneOf() [1/2]

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

Definition at line 27 of file RetainSummaryManager.cpp.

References P.

Referenced by getMissingDeclaratorIdLoc(), and isOneOf().

◆ isOneOf() [2/2]

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

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

Definition at line 34 of file RetainSummaryManager.cpp.

References clang::ento::CF, clang::classof(), clang::ento::Generalized, clang::Decl::hasAttr(), clang::ento::cocoa::isCocoaObjectRef(), isOneOf(), clang::ento::ObjC, and clang::ento::OS.

◆ isOSIteratorSubclass()

static bool isOSIteratorSubclass ( const Decl D)
static

Definition at line 172 of file RetainSummaryManager.cpp.

References isSubclass().

Referenced by isOSObjectRelated().

◆ isOSObjectDynamicCast()

static bool isOSObjectDynamicCast ( StringRef  S)
static

Definition at line 151 of file RetainSummaryManager.cpp.

Referenced by isOSObjectRelated().

◆ isOSObjectPtr()

static bool isOSObjectPtr ( QualType  QT)
static

◆ isOSObjectRelated()

static bool isOSObjectRelated ( const CXXMethodDecl MD)
static

◆ isOSObjectRequiredCast()

static bool isOSObjectRequiredCast ( StringRef  S)
static

Definition at line 155 of file RetainSummaryManager.cpp.

Referenced by isOSObjectRelated().

◆ isOSObjectSubclass()

static bool isOSObjectSubclass ( const Decl D)
static

Definition at line 147 of file RetainSummaryManager.cpp.

References isSubclass().

Referenced by isOSObjectPtr(), and isOSObjectRelated().

◆ isOSObjectThisCast()

static bool isOSObjectThisCast ( StringRef  S)
static

Definition at line 159 of file RetainSummaryManager.cpp.

Referenced by isOSObjectRelated().

◆ isRelease()

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

Definition at line 188 of file RetainSummaryManager.cpp.

Referenced by isOSObjectRelated().

◆ isRetain()

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

Definition at line 184 of file RetainSummaryManager.cpp.

Referenced by isOSObjectRelated().

◆ isSubclass()

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