clang 20.0.0git
|
#include "clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/Type.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/Support/BumpVector.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceManager.h"
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/DynamicExtent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h"
#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.
Macros | |
#define | DEBUG_TYPE "MemRegion" |
#define | REGION(Id, Parent) |
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. | |
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) |
#define DEBUG_TYPE "MemRegion" |
Definition at line 62 of file MemRegion.cpp.
|
static |
Definition at line 1487 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().
|
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 977 of file MemRegion.cpp.
References clang::LocationContext::getParent().
Referenced by clang::ento::MemRegionManager::getVarRegion().
|
static |
Returns true if Base
is an immediate base class of Child
.
Definition at line 1473 of file MemRegion.cpp.
Referenced by calculateOffset().
|
static |
Checks whether BaseClass
is a valid virtual or direct non-virtual base class of the type of Super
.
Definition at line 1253 of file MemRegion.cpp.
References clang::Class, clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::getCanonicalDecl(), and clang::ento::TypedValueRegion::getValueType().
Referenced by clang::ento::MemRegionManager::getCXXBaseObjectRegion().