clang: lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp File Reference (original) (raw)
Go to the source code of this file.
Namespaces | |
---|---|
namespace | clang |
The JSON file list parser is used to communicate input to InstallAPI. | |
namespace | clang::ento |
namespace | clang::ento::retaincountchecker |
Functions | |
---|---|
const RefVal * | clang::ento::retaincountchecker::getRefBinding (ProgramStateRef State, SymbolRef Sym) |
static ProgramStateRef | setRefBinding (ProgramStateRef State, SymbolRef Sym, RefVal Val) |
static ProgramStateRef | removeRefBinding (ProgramStateRef State, SymbolRef Sym) |
static bool | isReceiverUnconsumedSelf (const CallEvent &Call) |
static const RetainSummary * | getSummary (RetainSummaryManager &Summaries, const CallEvent &Call, QualType ReceiverType) |
static QualType | GetReturnType (const Expr *RetE, ASTContext &Ctx) |
GetReturnType - Used to get the return type of a message expression or function call with the intention of affixing that type to a tracked symbol. | |
static std::optional< RefVal > | refValFromRetEffect (RetEffect RE, QualType ResultTy) |
static bool | isPointerToObject (QualType QT) |
static bool | shouldEscapeOSArgumentOnCall (const CallEvent &CE, unsigned ArgIdx, const RefVal *TrackedValue) |
Whether the tracked value should be escaped on a given call. | |
static bool | isSmartPtrField (const MemRegion *MR) |
static bool | shouldEscapeRegion (const MemRegion *R) |
A value escapes in these possible cases: | |
static SmallVector< ProgramStateRef, 2 > | updateOutParameters (ProgramStateRef State, const RetainSummary &Summ, const CallEvent &CE) |
◆ INIT_BUGTYPE
| #define INIT_BUGTYPE | ( | | KIND | ) | | --------------------- | - | | ---- | - |
Value:
Chk->KIND = std::make_unique(Mgr.getCurrentCheckerName(), \
RefCountBug::KIND);
◆ LAZY_INIT_BUGTYPE
| #define LAZY_INIT_BUGTYPE | ( | | KIND | ) | | --------------------------- | - | | ---- | - |
Value:
if (!Chk->KIND) \
Chk->KIND = std::make_unique(Mgr.getCurrentCheckerName(), \
RefCountBug::KIND);
◆ GetReturnType()
◆ getSummary()
◆ isPointerToObject()
◆ isReceiverUnconsumedSelf()
static bool isReceiverUnconsumedSelf ( const CallEvent & Call) | static |
---|
◆ isSmartPtrField()
◆ refValFromRetEffect()
◆ removeRefBinding()
◆ setRefBinding()
◆ shouldEscapeOSArgumentOnCall()
◆ shouldEscapeRegion()
◆ updateOutParameters()
Definition at line 520 of file RetainCountChecker.cpp.
References clang::ento::RetainSummary::getArg(), clang::ento::RetainSummary::getArgEffects(), clang::ento::CallEvent::getArgSVal(), clang::ento::SVal::getAs(), clang::ento::SVal::getAsLocSymbol(), clang::ento::SVal::getAsRegion(), clang::ento::ArgEffect::getKind(), clang::ento::CallEvent::getNumArgs(), clang::ento::ArgEffect::getObjKind(), clang::ento::CallEvent::getResultType(), clang::ento::CallEvent::getReturnValue(), clang::Type::isScalarType(), clang::ento::retaincountchecker::RefVal::makeNotOwned(), clang::ento::retaincountchecker::RefVal::makeOwned(), clang::ento::OS, P, clang::ento::RetainedOutParameter, clang::ento::RetainedOutParameterOnNonZero, clang::ento::RetainedOutParameterOnZero, setRefBinding(), shouldEscapeRegion(), and clang::ento::UnretainedOutParameter.
Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkSummary().