<
typenameLatticeT>
88 constCallExpr *DerefExpr, RecordStorageLocation *SmartPointerLoc,
89TransferState<LatticeT> &State,
90llvm::function_ref<
void(StorageLocation &)> InitializeLoc);
98template<
typenameLatticeT>
100 constCallExpr *GetExpr, RecordStorageLocation *SmartPointerLoc,
101TransferState<LatticeT> &State,
102llvm::function_ref<
void(StorageLocation &)> InitializeLoc);
104template<
typenameLatticeT>
109 if(State.Env.getStorageLocation(*DerefExpr) !=
nullptr)
111 if(SmartPointerLoc ==
nullptr)
115 if(Callee ==
nullptr)
120assert(CanonicalCallee !=
nullptr);
121 if(CanonicalCallee != Callee) {
125Callee->getReturnType()->isReferenceType());
129Callee->getReturnType()
130.getNonReferenceType()
131->getCanonicalTypeUnqualified());
135State.Lattice.getOrCreateConstMethodReturnStorageLocation(
136*SmartPointerLoc, CanonicalCallee, State.Env, InitializeLoc);
137State.Env.setStorageLocation(*DerefExpr, LocForValue);
140template<
typenameLatticeT>
145 if(SmartPointerLoc ==
nullptr)
151 if(CanonicalCallee !=
nullptr) {
153State.Lattice.getOrCreateConstMethodReturnStorageLocation(
154*SmartPointerLoc, CanonicalCallee, State.Env, InitializeLoc);
155State.Env.setValue(*GetExpr,
156State.Env.template create<PointerValue>(LocForValue));
159 Value*Val = State.Lattice.getOrCreateConstMethodReturnValue(
160*SmartPointerLoc, GetExpr, State.Env);
163State.Env.setValue(*GetExpr, *Val);
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.
QualType getReturnType() const
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
CanQualType getCanonicalTypeUnqualified() const
bool isReferenceType() const
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.
internal::Matcher< Stmt > StatementMatcher
Dataflow Directional Tag Classes.
void transferSmartPointerLikeCachedDeref(const CallExpr *DerefExpr, RecordStorageLocation *SmartPointerLoc, TransferState< LatticeT > &State, llvm::function_ref< void(StorageLocation &)> InitializeLoc)
A transfer function for operator* (and value) calls that can be cached.
void transferSmartPointerLikeCachedGet(const CallExpr *GetExpr, RecordStorageLocation *SmartPointerLoc, TransferState< LatticeT > &State, llvm::function_ref< void(StorageLocation &)> InitializeLoc)
A transfer function for operator-> (and get) calls that can be cached.
ast_matchers::StatementMatcher isSmartPointerLikeGetMethodCall()
ast_matchers::StatementMatcher isSmartPointerLikeValueMethodCall()
ast_matchers::StatementMatcher isSmartPointerLikeOperatorArrow()
const FunctionDecl * getCanonicalSmartPointerLikeOperatorCallee(const CallExpr *CE)
Returns the "canonical" callee for smart pointer operators (* and ->) as a key for caching.
ast_matchers::StatementMatcher isSmartPointerLikeOperatorStar()
Matchers: For now, these match on any class with an operator* or operator-> where the return types ha...
A common form of state shared between the cases of a transfer function.
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