#include "clang/StaticAnalyzer/Core/PathSensitive/Store.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/CXXInheritance.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/Type.h"
#include "clang/Basic/LLVM.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include <cassert>
#include <cstdint>
#include <optional>
usingnamespaceclang;
usingnamespaceento;
StoreManager::StoreManager(ProgramStateManager &stateMgr)
: … { … }
StoreRef StoreManager::enterStackFrame(Store OldStore,
const CallEvent &Call,
const StackFrameContext *LCtx) { … }
const ElementRegion *StoreManager::MakeElementRegion(const SubRegion *Base,
QualType EleTy,
uint64_t index) { … }
const ElementRegion *StoreManager::GetElementZeroRegion(const SubRegion *R,
QualType T) { … }
std::optional<const MemRegion *> StoreManager::castRegion(const MemRegion *R,
QualType CastToTy) { … }
static bool regionMatchesCXXRecordType(SVal V, QualType Ty) { … }
SVal StoreManager::evalDerivedToBase(SVal Derived, const CastExpr *Cast) { … }
SVal StoreManager::evalDerivedToBase(SVal Derived, const CXXBasePath &Path) { … }
SVal StoreManager::evalDerivedToBase(SVal Derived, QualType BaseType,
bool IsVirtual) { … }
static const CXXRecordDecl *getCXXRecordType(const MemRegion *MR) { … }
std::optional<SVal> StoreManager::evalBaseToDerived(SVal Base,
QualType TargetType) { … }
SVal StoreManager::getLValueFieldOrIvar(const Decl *D, SVal Base) { … }
SVal StoreManager::getLValueIvar(const ObjCIvarDecl *decl, SVal base) { … }
SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset,
SVal Base) { … }
StoreManager::BindingsHandler::~BindingsHandler() = default;
bool StoreManager::FindUniqueBinding::HandleBinding(StoreManager& SMgr,
Store store,
const MemRegion* R,
SVal val) { … }