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

Encapsulates the retain count semantics on the arguments, return value, and receiver (if any) of a function/method call. More...

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

Public Member Functions

ArrayRef< ArgEffectgetArgs () const
 Returns the argument effects for a call. More...
 
ArgEffect getReceiver () const
 Returns the effects on the receiver. More...
 
RetEffect getReturnValue () const
 Returns the effect on the return value. More...
 

Static Public Member Functions

static CallEffects getEffect (const ObjCMethodDecl *MD)
 Return the CallEfect for a given Objective-C method. More...
 
static CallEffects getEffect (const FunctionDecl *FD)
 Return the CallEfect for a given C/C++ function. More...
 

Detailed Description

Encapsulates the retain count semantics on the arguments, return value, and receiver (if any) of a function/method call.

Note that construction of these objects is not highly efficient. That is okay for clients where creating these objects isn't really a bottleneck. The purpose of the API is to provide something simple. The actual static analyzer checker that implements retain/release typestate tracking uses something more efficient.

Definition at line 205 of file ObjCRetainCount.h.

Member Function Documentation

◆ getArgs()

ArrayRef<ArgEffect> clang::ento::objc_retain::CallEffects::getArgs ( ) const
inline

Returns the argument effects for a call.

Definition at line 214 of file ObjCRetainCount.h.

◆ getEffect() [1/2]

CallEffects clang::ento::objc_retain::CallEffects::getEffect ( const ObjCMethodDecl MD)
static

Return the CallEfect for a given Objective-C method.

Definition at line 4143 of file RetainCountChecker.cpp.

References createCallEffect.

◆ getEffect() [2/2]

CallEffects clang::ento::objc_retain::CallEffects::getEffect ( const FunctionDecl FD)
static

Return the CallEfect for a given C/C++ function.

Definition at line 4148 of file RetainCountChecker.cpp.

References createCallEffect.

◆ getReceiver()

ArgEffect clang::ento::objc_retain::CallEffects::getReceiver ( ) const
inline

Returns the effects on the receiver.

Definition at line 217 of file ObjCRetainCount.h.

◆ getReturnValue()

RetEffect clang::ento::objc_retain::CallEffects::getReturnValue ( ) const
inline

Returns the effect on the return value.

Definition at line 220 of file ObjCRetainCount.h.


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