clang: lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp File Reference (original) (raw)

Go to the source code of this file.

Functions
static bool shouldRunOnFunctionOrMethod (const NamedDecl *ND)
static bool isInitializationMethod (const ObjCMethodDecl *MD)
static bool isInitMessage (const ObjCMethodCall &Msg)
static bool isSelfVar (SVal location, CheckerContext &C)
Returns true if the location is 'self'.
static SelfFlagEnum getSelfFlags (SVal val, ProgramStateRef state)
A call receiving a reference to 'self' invalidates the object that 'self' contains.
static SelfFlagEnum getSelfFlags (SVal val, CheckerContext &C)
static void addSelfFlag (ProgramStateRef state, SVal val, SelfFlagEnum flag, CheckerContext &C)
static bool hasSelfFlag (SVal val, SelfFlagEnum flag, CheckerContext &C)
static bool isInvalidSelf (const Expr *E, CheckerContext &C)
Returns true of the value of the expression is the object that 'self' points to and is an object that did not come from the result of calling an initializer.

addSelfFlag()

getSelfFlags() [1/2]

getSelfFlags() [2/2]

A call receiving a reference to 'self' invalidates the object that 'self' contains.

This keeps the "self flags" assigned to the 'self' object before the call so we can assign them to the new object that 'self' points to after the call.

Definition at line 106 of file ObjCSelfInitChecker.cpp.

Referenced by addSelfFlag(), getSelfFlags(), and hasSelfFlag().

hasSelfFlag()

isInitializationMethod()

isInitMessage()

isInvalidSelf()

Returns true of the value of the expression is the object that 'self' points to and is an object that did not come from the result of calling an initializer.

Definition at line 134 of file ObjCSelfInitChecker.cpp.

References clang::C, E, and hasSelfFlag().

isSelfVar()

shouldRunOnFunctionOrMethod()

static bool shouldRunOnFunctionOrMethod ( const NamedDecl * ND) static