;
33llvm::ImmutableList<SVal> L) {
35ID.AddPointer(L.getInternalPointer());
42ID.AddPointer(region);
46llvm::FoldingSetNodeID &ID,
const NamedDecl*
D,
47llvm::ImmutableList<const CXXBaseSpecifier *> L) {
49ID.AddPointer(L.getInternalPointer());
59 X.first.Profile(
ID);
60 ID.AddPointer( (
void*)
X.second);
66 X.first.Profile(
ID);
67 X.second.Profile(
ID);
74llvm::FoldingSet<llvm::FoldingSetNodeWrapper<SValData>>;
77llvm::FoldingSet<llvm::FoldingSetNodeWrapper<SValPair>>;
83 for(
const auto&I : APSIntSet)
84I.getValue().~APSInt();
90APSIntPtrBasicValueFactory::getValue(
constllvm::APSInt &
X) {
91llvm::FoldingSetNodeID ID;
94 usingFoldNodeTy = llvm::FoldingSetNodeWrapper<llvm::APSInt>;
97FoldNodeTy*
P= APSIntSet.FindNodeOrInsertPos(ID, InsertPos);
100 P=
new(BPAlloc) FoldNodeTy(
X);
101APSIntSet.InsertNode(
P, InsertPos);
110 returngetValue(
V);
113APSIntPtrBasicValueFactory::getValue(uint64_t
X,
unsignedBitWidth,
117 returngetValue(
V);
126llvm::ImmutableList<SVal> Vals) {
127llvm::FoldingSetNodeID ID;
131 CompoundValData*
D= CompoundValDataSet.FindNodeOrInsertPos(ID, InsertPos);
135CompoundValDataSet.InsertNode(
D, InsertPos);
144llvm::FoldingSetNodeID ID;
149LazyCompoundValDataSet.FindNodeOrInsertPos(ID, InsertPos);
153LazyCompoundValDataSet.InsertNode(
D, InsertPos);
160 const NamedDecl*ND, llvm::ImmutableList<const CXXBaseSpecifier *> L) {
161llvm::FoldingSetNodeID ID;
166PointerToMemberDataSet.FindNodeOrInsertPos(ID, InsertPos);
170PointerToMemberDataSet.InsertNode(
D, InsertPos);
177llvm::ImmutableList<const CXXBaseSpecifier *> BaseSpecList) {
180 QualTypeBaseType = BaseSpec->getType();
182 if(!BaseSpecSeen.insert(BaseType).second)
189llvm::iterator_range<CastExpr::path_const_iterator> PathRange,
191assert((kind == CK_DerivedToBaseMemberPointer ||
192kind == CK_BaseToDerivedMemberPointer ||
193kind == CK_ReinterpretMemberPointer) &&
194 "accumCXXBase called with wrong CastKind");
197llvm::ImmutableList<const CXXBaseSpecifier *> BaseSpecList;
199 if(PTMDT.isNull() || isa<const NamedDecl *>(PTMDT)) {
200 if(
const auto*NDP = dyn_cast_if_present<const NamedDecl *>(PTMDT))
203BaseSpecList = CXXBaseListFactory.getEmptyList();
205 const auto*PTMD = cast<const PointerToMemberData *>(PTMDT);
206ND = PTMD->getDeclaratorDecl();
208BaseSpecList = PTMD->getCXXBaseList();
212 "CXXBaseSpecifier list of PointerToMemberData must not have repeated " 215 if(kind == CK_DerivedToBaseMemberPointer) {
226 autoReducedBaseSpecList = CXXBaseListFactory.getEmptyList();
229 returnBaseSpec->getType() == I->getType();
231 if(llvm::none_of(PathRange, IsSameAsBaseSpec))
232ReducedBaseSpecList =
233CXXBaseListFactory.add(BaseSpec, ReducedBaseSpecList);
245std::optional<APSIntPtr>
247 constllvm::APSInt &V2) {
250llvm_unreachable(
"Invalid Opcode.");
253 returngetValue(V1 * V2);
258 returngetValue(V1 / V2);
263 returngetValue(V1 % V2);
266 returngetValue(V1 + V2);
269 returngetValue(V1 - V2);
275 if(V2.isNegative() || V2.getBitWidth() > 64)
278uint64_t Amt = V2.getZExtValue();
280 if(Amt >= V1.getBitWidth())
283 returngetValue(V1.operator<<((
unsigned)Amt));
290 if(V2.isNegative() || V2.getBitWidth() > 64)
293uint64_t Amt = V2.getZExtValue();
295 if(Amt >= V1.getBitWidth())
298 returngetValue(V1.operator>>((
unsigned)Amt));
322 returngetValue(V1 & V2);
325 returngetValue(V1 | V2);
328 returngetValue(V1 ^ V2);
332conststd::pair<SVal, uintptr_t>&
337llvm::FoldingSetNodeID ID;
340ID.AddPointer((
void*)
Data);
344 usingFoldNodeTy = llvm::FoldingSetNodeWrapper<SValData>;
346FoldNodeTy*
P= Map.FindNodeOrInsertPos(ID, InsertPos);
349 P=
new(BPAlloc) FoldNodeTy(std::make_pair(
V,
Data));
350Map.InsertNode(
P, InsertPos);
353 return P->getValue();
356conststd::pair<SVal, SVal>&
361llvm::FoldingSetNodeID ID;
368 usingFoldNodeTy = llvm::FoldingSetNodeWrapper<SValPair>;
370FoldNodeTy*
P= Map.FindNodeOrInsertPos(ID, InsertPos);
373 P=
new(BPAlloc) FoldNodeTy(std::make_pair(V1, V2));
374Map.InsertNode(
P, InsertPos);
377 return P->getValue();
static bool isUnsigned(SValBuilder &SVB, NonLoc Value)
std::pair< SVal, SVal > SValPair
llvm::FoldingSet< llvm::FoldingSetNodeWrapper< SValData > > PersistentSValsTy
llvm::FoldingSet< llvm::FoldingSetNodeWrapper< SValPair > > PersistentSValPairsTy
std::pair< SVal, uintptr_t > SValData
static LLVM_ATTRIBUTE_UNUSED bool hasNoRepeatedElements(llvm::ImmutableList< const CXXBaseSpecifier * > BaseSpecList)
Represents a base class of a C++ class.
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Ctx)
This represents a decl that may have a name.
A (possibly-)qualified type.
A safe wrapper around APSInt objects allocated and owned by BasicValueFactory.
static APSIntPtr unsafeConstructor(const APSInt *Ptr)
You should not use this API.
const CompoundValData * getCompoundValData(QualType T, llvm::ImmutableList< SVal > Vals)
const std::pair< SVal, SVal > & getPersistentSValPair(const SVal &V1, const SVal &V2)
const SVal * getPersistentSVal(SVal X)
const std::pair< SVal, uintptr_t > & getPersistentSValWithData(const SVal &V, uintptr_t Data)
APSIntType getAPSIntType(QualType T) const
Returns the type of the APSInt used to store values of the given QualType.
std::optional< APSIntPtr > evalAPSInt(BinaryOperator::Opcode Op, const llvm::APSInt &V1, const llvm::APSInt &V2)
APSIntPtr getTruthValue(bool b, QualType T)
const PointerToMemberData * getPointerToMemberData(const NamedDecl *ND, llvm::ImmutableList< const CXXBaseSpecifier * > L)
llvm::ImmutableList< const CXXBaseSpecifier * > prependCXXBase(const CXXBaseSpecifier *CBS, llvm::ImmutableList< const CXXBaseSpecifier * > L)
const LazyCompoundValData * getLazyCompoundValData(const StoreRef &store, const TypedValueRegion *region)
const PointerToMemberData * accumCXXBase(llvm::iterator_range< CastExpr::path_const_iterator > PathRange, const nonloc::PointerToMember &PTM, const clang::CastKind &kind)
static void Profile(llvm::FoldingSetNodeID &ID, QualType T, llvm::ImmutableList< SVal > L)
static void Profile(llvm::FoldingSetNodeID &ID, const StoreRef &store, const TypedValueRegion *region)
static void Profile(llvm::FoldingSetNodeID &ID, const NamedDecl *D, llvm::ImmutableList< const CXXBaseSpecifier * > L)
SVal - This represents a symbolic expression, which can be either an L-value or an R-value.
void Profile(llvm::FoldingSetNodeID &ID) const
TypedValueRegion - An abstract class representing regions having a typed value.
Value representing pointer-to-member.
llvm::PointerUnion< const NamedDecl *, const PointerToMemberData * > PTMDataType
const PTMDataType getPTMData() const
The JSON file list parser is used to communicate input to InstallAPI.
CastKind
CastKind - The kind of operation required for a conversion.
const FunctionProtoType * T
Diagnostic wrappers for TextAPI types for error reporting.
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
static void Profile(const SValData &X, llvm::FoldingSetNodeID &ID)
static void Profile(const SValPair &X, llvm::FoldingSetNodeID &ID)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4