clang 22.0.0git
MacOSKeychainAPIChecker.cpp File Reference

Go to the source code of this file.

Functions

 REGISTER_MAP_WITH_PROGRAMSTATE (AllocatedData, SymbolRef, MacOSKeychainAPIChecker::AllocationState) static bool isEnclosingFunctionParam(const Expr *E)
 ProgramState traits to store the currently allocated (and not yet freed) symbols.
static bool isBadDeallocationArgument (const MemRegion *Arg)
static SymbolRef getAsPointeeSymbol (const Expr *Expr, CheckerContext &C)
 Given the address expression, retrieve the value it's pointing to.

Function Documentation

◆ getAsPointeeSymbol()

SymbolRef getAsPointeeSymbol ( const Expr * Expr,
CheckerContext & C )
static

Given the address expression, retrieve the value it's pointing to.

Assume that value is itself an address, and return the corresponding symbol.

Definition at line 203 of file MacOSKeychainAPIChecker.cpp.

References clang::C, clang::ento::SVal::getAs(), SM, and X.

◆ isBadDeallocationArgument()

bool isBadDeallocationArgument ( const MemRegion * Arg)
static

Definition at line 195 of file MacOSKeychainAPIChecker.cpp.

References clang::isa().

◆ REGISTER_MAP_WITH_PROGRAMSTATE()

REGISTER_MAP_WITH_PROGRAMSTATE ( AllocatedData ,
SymbolRef ,
MacOSKeychainAPIChecker::AllocationState  ) const

ProgramState traits to store the currently allocated (and not yet freed) symbols.

This is a map from the allocated content symbol to the corresponding AllocationState.

Definition at line 151 of file MacOSKeychainAPIChecker.cpp.

References clang::Expr::IgnoreParenCasts(), and clang::isa().