clang  14.0.0git
Public Member Functions | Friends | List of all members
clang::ento::RetainSummary Class Reference

Summary for a function with respect to ownership changes. More...

#include "clang/Analysis/RetainSummaryManager.h"

Public Member Functions

 RetainSummary (ArgEffects A, RetEffect R, ArgEffect defaultEff, ArgEffect ReceiverEff, ArgEffect ThisEff)
 
ArgEffect getArg (unsigned idx) const
 getArg - Return the argument effect on the argument specified by idx (starting from 0). More...
 
void addArg (ArgEffects::Factory &af, unsigned idx, ArgEffect e)
 
void setDefaultArgEffect (ArgEffect E)
 setDefaultArgEffect - Set the default argument effect. More...
 
RetEffect getRetEffect () const
 getRetEffect - Returns the effect on the return value of the call. More...
 
void setRetEffect (RetEffect E)
 setRetEffect - Set the effect of the return value of the call. More...
 
void setReceiverEffect (ArgEffect e)
 Sets the effect on the receiver of the message. More...
 
ArgEffect getReceiverEffect () const
 getReceiverEffect - Returns the effect on the receiver of the call. More...
 
ArgEffect getThisEffect () const
 
ArgEffect getDefaultEffect () const
 
void setThisEffect (ArgEffect e)
 Set the effect of the method on "this". More...
 
bool isNoop () const
 
bool operator== (const RetainSummary &Other) const
 Test if two retain summaries are identical. More...
 
void Profile (llvm::FoldingSetNodeID &ID) const
 Profile this summary for inclusion in a FoldingSet. More...
 
bool isSimple () const
 A retain summary is simple if it has no ArgEffects other than the default. More...
 
ArgEffects getArgEffects () const
 

Friends

class RetainSummaryManager
 

Detailed Description

Summary for a function with respect to ownership changes.

Definition at line 282 of file RetainSummaryManager.h.

Constructor & Destructor Documentation

◆ RetainSummary()

clang::ento::RetainSummary::RetainSummary ( ArgEffects  A,
RetEffect  R,
ArgEffect  defaultEff,
ArgEffect  ReceiverEff,
ArgEffect  ThisEff 
)
inline

Definition at line 304 of file RetainSummaryManager.h.

Member Function Documentation

◆ addArg()

void clang::ento::RetainSummary::addArg ( ArgEffects::Factory &  af,
unsigned  idx,
ArgEffect  e 
)
inline

Definition at line 321 of file RetainSummaryManager.h.

◆ getArg()

ArgEffect clang::ento::RetainSummary::getArg ( unsigned  idx) const
inline

getArg - Return the argument effect on the argument specified by idx (starting from 0).

Definition at line 314 of file RetainSummaryManager.h.

Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkSummary(), clang::ento::retaincountchecker::RetainCountChecker::processSummaryOfInlined(), and updateOutParameters().

◆ getArgEffects()

ArgEffects clang::ento::RetainSummary::getArgEffects ( ) const
inline

◆ getDefaultEffect()

ArgEffect clang::ento::RetainSummary::getDefaultEffect ( ) const
inline

Definition at line 348 of file RetainSummaryManager.h.

◆ getReceiverEffect()

ArgEffect clang::ento::RetainSummary::getReceiverEffect ( ) const
inline

getReceiverEffect - Returns the effect on the receiver of the call.

This is only meaningful if the summary applies to an ObjCMessageExpr*.

Definition at line 342 of file RetainSummaryManager.h.

Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkSummary(), and clang::ento::retaincountchecker::RetainCountChecker::processSummaryOfInlined().

◆ getRetEffect()

RetEffect clang::ento::RetainSummary::getRetEffect ( ) const
inline

getRetEffect - Returns the effect on the return value of the call.

Definition at line 331 of file RetainSummaryManager.h.

References Ret().

Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkSummary(), and clang::ento::retaincountchecker::RetainCountChecker::processSummaryOfInlined().

◆ getThisEffect()

ArgEffect clang::ento::RetainSummary::getThisEffect ( ) const
inline
Returns
the effect on the "this" receiver of the method call. This is only meaningful if the summary applies to CXXMethodDecl*.

Definition at line 346 of file RetainSummaryManager.h.

References clang::interp::This().

Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkSummary().

◆ isNoop()

bool clang::ento::RetainSummary::isNoop ( ) const
inline

◆ isSimple()

bool clang::ento::RetainSummary::isSimple ( ) const
inline

A retain summary is simple if it has no ArgEffects other than the default.

Definition at line 377 of file RetainSummaryManager.h.

◆ operator==()

bool clang::ento::RetainSummary::operator== ( const RetainSummary Other) const
inline

Test if two retain summaries are identical.

Note that merely equivalent summaries are not necessarily identical (for example, if an explicit argument effect matches the default effect).

Definition at line 362 of file RetainSummaryManager.h.

References Ret(), and clang::interp::This().

◆ Profile()

void clang::ento::RetainSummary::Profile ( llvm::FoldingSetNodeID &  ID) const
inline

Profile this summary for inclusion in a FoldingSet.

Definition at line 368 of file RetainSummaryManager.h.

References Ret(), and clang::interp::This().

◆ setDefaultArgEffect()

void clang::ento::RetainSummary::setDefaultArgEffect ( ArgEffect  E)
inline

setDefaultArgEffect - Set the default argument effect.

Definition at line 326 of file RetainSummaryManager.h.

◆ setReceiverEffect()

void clang::ento::RetainSummary::setReceiverEffect ( ArgEffect  e)
inline

Sets the effect on the receiver of the message.

Definition at line 338 of file RetainSummaryManager.h.

◆ setRetEffect()

void clang::ento::RetainSummary::setRetEffect ( RetEffect  E)
inline

setRetEffect - Set the effect of the return value of the call.

Definition at line 334 of file RetainSummaryManager.h.

References Ret().

◆ setThisEffect()

void clang::ento::RetainSummary::setThisEffect ( ArgEffect  e)
inline

Set the effect of the method on "this".

Definition at line 351 of file RetainSummaryManager.h.

References clang::interp::This().

Friends And Related Function Documentation

◆ RetainSummaryManager

friend class RetainSummaryManager
friend

Definition at line 386 of file RetainSummaryManager.h.


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