llvm/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp

//===- BasicValueFactory.cpp - Basic values for Path Sens analysis --------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
//  This file defines BasicValueFactory, a class that manages the lifetime
//  of APSInt objects and symbolic constraints used by ExprEngine
//  and related classes.
//
//===----------------------------------------------------------------------===//

#include "clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/Store.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/ImmutableList.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include <cassert>
#include <cstdint>
#include <utility>

usingnamespaceclang;
usingnamespaceento;

void CompoundValData::Profile(llvm::FoldingSetNodeID& ID, QualType T,
                              llvm::ImmutableList<SVal> L) {}

void LazyCompoundValData::Profile(llvm::FoldingSetNodeID& ID,
                                  const StoreRef &store,
                                  const TypedValueRegion *region) {}

void PointerToMemberData::Profile(
    llvm::FoldingSetNodeID &ID, const NamedDecl *D,
    llvm::ImmutableList<const CXXBaseSpecifier *> L) {}

SValData;
SValPair;

namespace llvm {

template<> struct FoldingSetTrait<SValData> {};

template<> struct FoldingSetTrait<SValPair> {};

} // namespace llvm

PersistentSValsTy;

PersistentSValPairsTy;

BasicValueFactory::~BasicValueFactory() {}

const llvm::APSInt& BasicValueFactory::getValue(const llvm::APSInt& X) {}

const llvm::APSInt& BasicValueFactory::getValue(const llvm::APInt& X,
                                                bool isUnsigned) {}

const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, unsigned BitWidth,
                                           bool isUnsigned) {}

const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, QualType T) {}

const CompoundValData*
BasicValueFactory::getCompoundValData(QualType T,
                                      llvm::ImmutableList<SVal> Vals) {}

const LazyCompoundValData*
BasicValueFactory::getLazyCompoundValData(const StoreRef &store,
                                          const TypedValueRegion *region) {}

const PointerToMemberData *BasicValueFactory::getPointerToMemberData(
    const NamedDecl *ND, llvm::ImmutableList<const CXXBaseSpecifier *> L) {}

LLVM_ATTRIBUTE_UNUSED bool hasNoRepeatedElements(
    llvm::ImmutableList<const CXXBaseSpecifier *> BaseSpecList) {}

const PointerToMemberData *BasicValueFactory::accumCXXBase(
    llvm::iterator_range<CastExpr::path_const_iterator> PathRange,
    const nonloc::PointerToMember &PTM, const CastKind &kind) {}

const llvm::APSInt*
BasicValueFactory::evalAPSInt(BinaryOperator::Opcode Op,
                             const llvm::APSInt& V1, const llvm::APSInt& V2) {}

const std::pair<SVal, uintptr_t>&
BasicValueFactory::getPersistentSValWithData(const SVal& V, uintptr_t Data) {}

const std::pair<SVal, SVal>&
BasicValueFactory::getPersistentSValPair(const SVal& V1, const SVal& V2) {}

const SVal* BasicValueFactory::getPersistentSVal(SVal X) {}