clang API Documentation
#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"
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) |
| static bool | isValidBaseClass (const CXXRecordDecl *BaseClass, const TypedValueRegion *Super, bool IsVirtual) |
| static bool | isImmediateBase (const CXXRecordDecl *Child, const CXXRecordDecl *Base) |
Returns true if Base is an immediate base class of Child. | |
| 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 738 of file MemRegion.cpp.
References clang::LocationContext::getParent(), 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 1163 of file MemRegion.cpp.
References clang::CodeGen::Base, and clang::CXXRecordDecl::bases().
Referenced by clang::ento::MemRegion::getAsOffset().
| 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 968 of file MemRegion.cpp.
References clang::CXXRecordDecl::bases(), clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::getCanonicalDecl(), clang::ento::TypedValueRegion::getValueType(), and clang::CXXRecordDecl::isVirtuallyDerivedFrom().
Referenced by clang::ento::MemRegionManager::getCXXBaseObjectRegion().