original) (raw)
clang: lib/StaticAnalyzer/Core/MemRegion.cpp File Reference (#include "[clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h](MemRegion%5F8h%5Fsource.html)"
#include "[clang/AST/ASTContext.h](ASTContext%5F8h%5Fsource.html)"
#include "[clang/AST/Attr.h](AST%5F2Attr%5F8h%5Fsource.html)"
#include "[clang/AST/CharUnits.h](CharUnits%5F8h%5Fsource.html)"
#include "[clang/AST/Decl.h](Decl%5F8h%5Fsource.html)"
#include "[clang/AST/DeclCXX.h](DeclCXX%5F8h%5Fsource.html)"
#include "[clang/AST/DeclObjC.h](DeclObjC%5F8h%5Fsource.html)"
#include "[clang/AST/Expr.h](Expr%5F8h%5Fsource.html)"
#include "[clang/AST/PrettyPrinter.h](PrettyPrinter%5F8h%5Fsource.html)"
#include "[clang/AST/RecordLayout.h](RecordLayout%5F8h%5Fsource.html)"
#include "[clang/AST/Type.h](Type%5F8h%5Fsource.html)"
#include "[clang/Analysis/AnalysisDeclContext.h](AnalysisDeclContext%5F8h%5Fsource.html)"
#include "[clang/Analysis/Support/BumpVector.h](BumpVector%5F8h%5Fsource.html)"
#include "[clang/Basic/IdentifierTable.h](IdentifierTable%5F8h%5Fsource.html)"
#include "[clang/Basic/LLVM.h](LLVM%5F8h%5Fsource.html)"
#include "[clang/Basic/SourceManager.h](SourceManager%5F8h%5Fsource.html)"
#include "[clang/StaticAnalyzer/Core/AnalyzerOptions.h](AnalyzerOptions%5F8h%5Fsource.html)"
#include "[clang/StaticAnalyzer/Core/PathSensitive/DynamicExtent.h](DynamicExtent%5F8h%5Fsource.html)"
#include "[clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h](SValBuilder%5F8h%5Fsource.html)"
#include "[clang/StaticAnalyzer/Core/PathSensitive/SVals.h](SVals%5F8h%5Fsource.html)"
#include "[clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h](SymbolManager%5F8h%5Fsource.html)"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CheckedArithmetic.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <functional>
#include <iterator>
#include <optional>
#include <string>
#include <tuple>
#include <utility>
#include "clang/StaticAnalyzer/Core/PathSensitive/Regions.def"
Go to the source code of this file.
Functions | |
---|---|
static bool | isAReferenceTypedValueRegion (const MemRegion *R) |
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. | |
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. | |
static bool | isImmediateBase (const CXXRecordDecl *Child, const CXXRecordDecl *Base) |
Returns true if Base is an immediate base class of Child. | |
static RegionOffset | calculateOffset (const MemRegion *R) |
◆ DEBUG_TYPE
#define DEBUG_TYPE "MemRegion"
◆ REGION
Value:
case Id##Kind: \
return #Id;
◆ calculateOffset()
Definition at line 1508 of file MemRegion.cpp.
References clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::ASTContext::getCharWidth(), clang::ento::MemRegion::getContext(), clang::ASTRecordLayout::getFieldOffset(), clang::ento::MemRegion::getKind(), clang::DeclContext::getParent(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSize(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::TagDecl::isCompleteDefinition(), isImmediateBase(), clang::Type::isIncompleteType(), clang::TagDecl::isUnion(), and clang::ento::RegionOffset::Symbolic.
Referenced by clang::ento::MemRegion::getAsOffset().
◆ getStackOrCaptureRegionForDeclContext()
◆ isAReferenceTypedValueRegion()
static bool isAReferenceTypedValueRegion ( const MemRegion * R) | static |
---|