clang  6.0.0svn
Functions
MemRegion.cpp File Reference
#include "clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h"
#include "clang/AST/Attr.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/RecordLayout.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/Support/BumpVector.h"
#include "clang/Basic/SourceManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for MemRegion.cpp:

Go to the source code of this file.

Functions

static llvm::PointerUnion< const StackFrameContext *, const VarRegion * > getStackOrCaptureRegionForDeclContext (const LocationContext *LC, const DeclContext *DC, const VarDecl *VD)
 Look through a chain of LocationContexts to either find the StackFrameContext that matches a DeclContext, or find a VarRegion for a variable captured by a block. More...
 
static bool isValidBaseClass (const CXXRecordDecl *BaseClass, const TypedValueRegion *Super, bool IsVirtual)
 Checks whether BaseClass is a valid virtual or direct non-virtual base class of the type of Super. More...
 
static bool isImmediateBase (const CXXRecordDecl *Child, const CXXRecordDecl *Base)
 Returns true if Base is an immediate base class of Child. More...
 

Function Documentation

◆ getStackOrCaptureRegionForDeclContext()

static llvm::PointerUnion<const StackFrameContext *, const VarRegion *> getStackOrCaptureRegionForDeclContext ( const LocationContext LC,
const DeclContext DC,
const VarDecl VD 
)
static

Look through a chain of LocationContexts to either find the StackFrameContext that matches a DeclContext, or find a VarRegion for a variable captured by a block.

Definition at line 754 of file MemRegion.cpp.

Referenced by clang::ento::MemRegionManager::getVarRegion().

◆ isImmediateBase()

static bool isImmediateBase ( const CXXRecordDecl Child,
const CXXRecordDecl Base 
)
static

Returns true if Base is an immediate base class of Child.

Definition at line 1194 of file MemRegion.cpp.

Referenced by clang::ento::MemRegion::getAsOffset().

◆ isValidBaseClass()

static bool isValidBaseClass ( const CXXRecordDecl BaseClass,
const TypedValueRegion Super,
bool  IsVirtual 
)
static

Checks whether BaseClass is a valid virtual or direct non-virtual base class of the type of Super.

Definition at line 987 of file MemRegion.cpp.

References clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::getCanonicalDecl(), clang::ento::TypedValueRegion::getValueType(), and clang::CXXRecordDecl::isVirtuallyDerivedFrom().

Referenced by clang::ento::MemRegionManager::getCXXBaseObjectRegion().