ConstMethodReturnValues.erase(&
RecordLoc);
103ConstMethodReturnStorageLocations.erase(&
RecordLoc);
107 returnBase::operator==(
Other);
115 usingConstMethodReturnValuesType =
117llvm::SmallDenseMap<const FunctionDecl *, Value *>>;
118ConstMethodReturnValuesType ConstMethodReturnValues;
122 usingConstMethodReturnStorageLocationsType = llvm::SmallDenseMap<
124llvm::SmallDenseMap<const FunctionDecl *, StorageLocation *>>;
125ConstMethodReturnStorageLocationsType ConstMethodReturnStorageLocations;
130template<
typenameT>
131llvm::SmallDenseMap<
constRecordStorageLocation *,
132llvm::SmallDenseMap<const FunctionDecl *, T *>>
135llvm::SmallDenseMap<const FunctionDecl *, T *>>
138llvm::SmallDenseMap<const FunctionDecl *, T *>>
142llvm::SmallDenseMap<const FunctionDecl *, T *>>
144 for(
auto&[
Loc, DeclToT] : Map1) {
145 autoIt = Map2.find(
Loc);
146 if(It == Map2.end()) {
150 const auto&OtherDeclToT = It->second;
152 for(
auto[
Func, Var] : DeclToT) {
153 T*OtherVar = OtherDeclToT.lookup(
Func);
154 if(OtherVar ==
nullptr|| OtherVar != Var) {
158JoinedDeclToT.insert({
Func, Var});
166template<
typenameBase>
176ConstMethodReturnValues =
177clang::dataflow::internal::joinConstMethodMap<dataflow::Value>(
178ConstMethodReturnValues,
Other.ConstMethodReturnValues, Effect);
180ConstMethodReturnStorageLocations =
181clang::dataflow::internal::joinConstMethodMap<dataflow::StorageLocation>(
182ConstMethodReturnStorageLocations,
183 Other.ConstMethodReturnStorageLocations, Effect);
188template<
typenameBase>
193assert(!
Type.isNull());
197 auto&ObjMap = ConstMethodReturnValues[&
RecordLoc];
199 if(DirectCallee ==
nullptr)
201 autoit = ObjMap.find(DirectCallee);
202 if(it != ObjMap.end())
207ObjMap.insert({DirectCallee, Val});
211template<
typenameBase>
218 auto&ObjMap = ConstMethodReturnStorageLocations[&
RecordLoc];
220 if(DirectCallee ==
nullptr)
222 autoit = ObjMap.find(DirectCallee);
223 if(it != ObjMap.end())
230ObjMap.insert({DirectCallee, &
Loc});
234template<
typenameBase>
239assert(Callee !=
nullptr);
241assert(!
Type.isNull());
243 auto&ObjMap = ConstMethodReturnStorageLocations[&
RecordLoc];
244 autoit = ObjMap.find(Callee);
245 if(it != ObjMap.end())
251ObjMap.insert({Callee, &
Loc});
llvm::MachO::RecordLoc RecordLoc
C Language Family Type Representation.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
FunctionDecl * getDirectCallee()
If the callee is a FunctionDecl, return it. Otherwise return null.
Represents a function declaration or definition.
A (possibly-)qualified type.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
The base class of the type hierarchy.
bool isReferenceType() const
bool isRecordType() const
A mixin for a lattice that additionally maintains a cache of stable method call return values to mode...
LatticeJoinEffect join(const CachedConstAccessorsLattice &Other)
void clearConstMethodReturnStorageLocations(const RecordStorageLocation &RecordLoc)
bool operator==(const CachedConstAccessorsLattice &Other) const
StorageLocation * getOrCreateConstMethodReturnStorageLocation(const RecordStorageLocation &RecordLoc, const CallExpr *CE, Environment &Env, llvm::function_ref< void(StorageLocation &)> Initialize)
Creates or returns a previously created StorageLocation associated with a const method call obj....
void clearConstMethodReturnValues(const RecordStorageLocation &RecordLoc)
Value * getOrCreateConstMethodReturnValue(const RecordStorageLocation &RecordLoc, const CallExpr *CE, Environment &Env)
Creates or returns a previously created Value associated with a const method call obj....
Holds the state of the program (store and heap) at a given program point.
StorageLocation & createStorageLocation(QualType Type)
Creates a storage location appropriate for Type.
Value * createValue(QualType Type)
Creates a value appropriate for Type, if Type is supported, otherwise returns null.
A storage location for a record (struct, class, or union).
Base class for elements of the local variable store and of the heap.
Base class for all values computed by abstract interpretation.
llvm::SmallDenseMap< const RecordStorageLocation *, llvm::SmallDenseMap< const FunctionDecl *, T * > > joinConstMethodMap(const llvm::SmallDenseMap< const RecordStorageLocation *, llvm::SmallDenseMap< const FunctionDecl *, T * > > &Map1, const llvm::SmallDenseMap< const RecordStorageLocation *, llvm::SmallDenseMap< const FunctionDecl *, T * > > &Map2, LatticeEffect &Effect)
LatticeEffect
Effect indicating whether a lattice operation resulted in a new value.
The JSON file list parser is used to communicate input to InstallAPI.
@ Result
The result type of a method or function.
const FunctionProtoType * T
@ Other
Other implicit parameter.
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