clang  6.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | List of all members
clang::ento::objc_retain::RetEffect Class Reference

RetEffect summarizes a call's retain/release behavior with respect to its return value. More...

#include "clang/StaticAnalyzer/Checkers/ObjCRetainCount.h"

Public Types

enum  Kind {
  NoRet, OwnedSymbol, NotOwnedSymbol, GCNotOwnedSymbol,
  OwnedWhenTrackedReceiver, NoRetHard
}
 
enum  ObjKind { CF, ObjC, AnyObj, Generalized }
 Determines the object kind of a tracked object. More...
 

Public Member Functions

Kind getKind () const
 
ObjKind getObjKind () const
 
bool isOwned () const
 
bool notOwned () const
 
bool operator== (const RetEffect &Other) const
 

Static Public Member Functions

static RetEffect MakeOwnedWhenTrackedReceiver ()
 
static RetEffect MakeOwned (ObjKind o)
 
static RetEffect MakeNotOwned (ObjKind o)
 
static RetEffect MakeGCNotOwned ()
 
static RetEffect MakeNoRet ()
 
static RetEffect MakeNoRetHard ()
 

Detailed Description

RetEffect summarizes a call's retain/release behavior with respect to its return value.

Definition at line 115 of file ObjCRetainCount.h.

Member Enumeration Documentation

◆ Kind

Enumerator
NoRet 

Indicates that no retain count information is tracked for the return value.

OwnedSymbol 

Indicates that the returned value is an owned (+1) symbol.

NotOwnedSymbol 

Indicates that the returned value is an object with retain count semantics but that it is not owned (+0).

This is the default for getters, etc.

GCNotOwnedSymbol 

Indicates that the object is not owned and controlled by the Garbage collector.

OwnedWhenTrackedReceiver 

Indicates that the return value is an owned object when the receiver is also a tracked object.

NoRetHard 

Definition at line 117 of file ObjCRetainCount.h.

◆ ObjKind

Determines the object kind of a tracked object.

Enumerator
CF 

Indicates that the tracked object is a CF object.

This is important between GC and non-GC code.

ObjC 

Indicates that the tracked object is an Objective-C object.

AnyObj 

Indicates that the tracked object could be a CF or Objective-C object.

Generalized 

Indicates that the tracked object is a generalized object.

Definition at line 141 of file ObjCRetainCount.h.

Member Function Documentation

◆ getKind()

Kind clang::ento::objc_retain::RetEffect::getKind ( ) const
inline

◆ getObjKind()

ObjKind clang::ento::objc_retain::RetEffect::getObjKind ( ) const
inline

◆ isOwned()

bool clang::ento::objc_retain::RetEffect::isOwned ( ) const
inline

Definition at line 164 of file ObjCRetainCount.h.

References OwnedSymbol, and OwnedWhenTrackedReceiver.

◆ MakeGCNotOwned()

static RetEffect clang::ento::objc_retain::RetEffect::MakeGCNotOwned ( )
inlinestatic

Definition at line 186 of file ObjCRetainCount.h.

References GCNotOwnedSymbol, and ObjC.

◆ MakeNoRet()

static RetEffect clang::ento::objc_retain::RetEffect::MakeNoRet ( )
inlinestatic

Definition at line 189 of file ObjCRetainCount.h.

References NoRet.

Referenced by isGeneralizedObjectRef(), and updateOutParameter().

◆ MakeNoRetHard()

static RetEffect clang::ento::objc_retain::RetEffect::MakeNoRetHard ( )
inlinestatic

Definition at line 192 of file ObjCRetainCount.h.

References NoRetHard.

Referenced by isGeneralizedObjectRef().

◆ MakeNotOwned()

static RetEffect clang::ento::objc_retain::RetEffect::MakeNotOwned ( ObjKind  o)
inlinestatic

Definition at line 183 of file ObjCRetainCount.h.

References NotOwnedSymbol.

Referenced by isGeneralizedObjectRef().

◆ MakeOwned()

static RetEffect clang::ento::objc_retain::RetEffect::MakeOwned ( ObjKind  o)
inlinestatic

Definition at line 180 of file ObjCRetainCount.h.

References OwnedSymbol.

Referenced by isGeneralizedObjectRef().

◆ MakeOwnedWhenTrackedReceiver()

static RetEffect clang::ento::objc_retain::RetEffect::MakeOwnedWhenTrackedReceiver ( )
inlinestatic

Definition at line 176 of file ObjCRetainCount.h.

References ObjC, and OwnedWhenTrackedReceiver.

◆ notOwned()

bool clang::ento::objc_retain::RetEffect::notOwned ( ) const
inline

Definition at line 168 of file ObjCRetainCount.h.

References NotOwnedSymbol.

◆ operator==()

bool clang::ento::objc_retain::RetEffect::operator== ( const RetEffect Other) const
inline

Definition at line 172 of file ObjCRetainCount.h.


The documentation for this class was generated from the following file: