clang API Documentation

Classes | Enumerations
clang::ento::objc_retain Namespace Reference

Classes

class  RetEffect
class  CallEffects

Enumerations

enum  ArgEffect {
  DoNothing, Autorelease, Dealloc, DecRef,
  DecRefMsg, DecRefBridgedTransferred, IncRefMsg, IncRef,
  MakeCollectable, MayEscape, StopTracking, StopTrackingHard,
  DecRefAndStopTrackingHard, DecRefMsgAndStopTrackingHard
}

Enumeration Type Documentation

An ArgEffect summarizes the retain count behavior on an argument or receiver to a function or method.

Enumerator:
DoNothing 

There is no effect.

Autorelease 

The argument is treated as if an -autorelease message had been sent to the referenced object.

Dealloc 

The argument is treated as if an -dealloc message had been sent to the referenced object.

DecRef 

The argument has its reference count decreased by 1. This is as if CFRelease has been called on the argument.

DecRefMsg 

The argument has its reference count decreased by 1. This is as if a -release message has been sent to the argument. This differs in behavior from DecRef when GC is enabled.

DecRefBridgedTransferred 

The argument has its reference count decreased by 1 to model a transferred bridge cast under ARC.

IncRefMsg 

The argument has its reference count increased by 1. This is as if a -retain message has been sent to the argument. This differs in behavior from IncRef when GC is enabled.

IncRef 

The argument has its reference count increased by 1. This is as if CFRetain has been called on the argument.

MakeCollectable 

The argument acts as if has been passed to CFMakeCollectable, which transfers the object to the Garbage Collector under GC.

MayEscape 

The argument is treated as potentially escaping, meaning that even when its reference count hits 0 it should be treated as still possibly being alive as someone else *may* be holding onto the object.

StopTracking 

All typestate tracking of the object ceases. This is usually employed when the effect of the call is completely unknown.

StopTrackingHard 

All typestate tracking of the object ceases. Unlike StopTracking, this is also enforced when the method body is inlined.

In some cases, we obtain a better summary for this checker by looking at the call site than by inlining the function. Signifies that we should stop tracking the symbol even if the function is inlined.

DecRefAndStopTrackingHard 

Performs the combined functionality of DecRef and StopTrackingHard.

The models the effect that the called function decrements the reference count of the argument and all typestate tracking on that argument should cease.

DecRefMsgAndStopTrackingHard 

Performs the combined functionality of DecRefMsg and StopTrackingHard.

The models the effect that the called function decrements the reference count of the argument and all typestate tracking on that argument should cease.

Definition at line 34 of file ObjCRetainCount.h.