clang 20.0.0git
Macros | Functions
StackAddrEscapeChecker.cpp File Reference
#include "clang/AST/ExprCXX.h"
#include "clang/Basic/SourceManager.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"

Go to the source code of this file.

Macros

#define REGISTER_CHECKER(name)
 

Functions

static const MemSpaceRegiongetStackOrGlobalSpaceRegion (const MemRegion *R)
 
static const MemRegiongetOriginBaseRegion (const MemRegion *Reg)
 
static std::optional< std::string > printReferrer (const MemRegion *Referrer)
 
static bool isInvalidatedSymbolRegion (const MemRegion *Region)
 Check whether Region refers to a freshly minted symbol after an opaque function call.
 

Macro Definition Documentation

◆ REGISTER_CHECKER

#define REGISTER_CHECKER (   name)
Value:
void ento::register##name(CheckerManager &Mgr) { \
StackAddrEscapeChecker *Chk = Mgr.getChecker<StackAddrEscapeChecker>(); \
Chk->ChecksEnabled[StackAddrEscapeChecker::CK_##name] = true; \
Chk->CheckNames[StackAddrEscapeChecker::CK_##name] = \
} \
\
bool ento::shouldRegister##name(const CheckerManager &mgr) { return true; }
CheckerNameRef getCurrentCheckerName() const

Definition at line 543 of file StackAddrEscapeChecker.cpp.

Function Documentation

◆ getOriginBaseRegion()

static const MemRegion * getOriginBaseRegion ( const MemRegion Reg)
static

◆ getStackOrGlobalSpaceRegion()

static const MemSpaceRegion * getStackOrGlobalSpaceRegion ( const MemRegion R)
static

◆ isInvalidatedSymbolRegion()

static bool isInvalidatedSymbolRegion ( const MemRegion Region)
static

Check whether Region refers to a freshly minted symbol after an opaque function call.

Definition at line 361 of file StackAddrEscapeChecker.cpp.

References clang::ento::MemRegion::getAs().

◆ printReferrer()

static std::optional< std::string > printReferrer ( const MemRegion Referrer)
static