clang  3.9.0
Classes | 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/AnalysisContext.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.

Classes

struct  MemRegionManagerTrait< RegionTy >
 

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

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 794 of file MemRegion.cpp.

References E, clang::LocationContext::getParent(), I, clang::ento::BlockDataRegion::referenced_vars_begin(), and clang::ento::BlockDataRegion::referenced_vars_end().

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

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

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

Definition at line 1232 of file MemRegion.cpp.

References clang::CXXRecordDecl::bases(), and I.

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

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