21 #include "llvm/ADT/SmallSet.h"
22 #include "llvm/ADT/StringExtras.h"
23 #include "llvm/Support/raw_ostream.h"
25 using namespace clang;
30 assert(E &&
"Calls without origin expressions do not have results");
68 for (
const auto *
I : RD->
fields()) {
99 I !=
E && Idx < NumOfArgs; ++
I, ++Idx) {
100 if (NumOfArgs <= Idx)
150 I !=
E; ++
I, ++Idx) {
152 PreserveArgs.insert(Idx);
162 if (callee->hasAttr<PureAttr>() || callee->hasAttr<ConstAttr>())
171 llvm::SmallSet<unsigned, 4> PreserveArgs;
178 if (PreserveArgs.count(Idx))
184 ValuesToInvalidate.push_back(
getArgSVal(Idx));
190 return Result->invalidateRegions(ValuesToInvalidate,
getOriginExpr(),
193 nullptr,
this, &ETraits);
205 assert(D &&
"Cannot get a program point without a statement or decl");
224 return ArgE->getSourceRange();
251 Out <<
"Unknown call (type " <<
getKind() <<
")";
256 return isa<CallExpr>(
S) || isa<ObjCMessageExpr>(S)
257 || isa<CXXConstructExpr>(
S)
258 || isa<CXXNewExpr>(S);
264 return FD->getReturnType();
266 return MD->getReturnType();
267 if (
const BlockDecl *BD = dyn_cast<BlockDecl>(D)) {
279 Ty = FT->getReturnType();
287 llvm_unreachable(
"unknown callable kind");
294 return FD->isVariadic();
296 return MD->isVariadic();
297 if (
const BlockDecl *BD = dyn_cast<BlockDecl>(D))
298 return BD->isVariadic();
300 llvm_unreachable(
"unknown callable kind");
307 ArrayRef<ParmVarDecl*> parameters) {
315 for (; I !=
E && Idx <
NumArgs; ++
I, ++Idx) {
317 assert(ParamDecl &&
"Formal parameter has no decl?");
322 Bindings.push_back(std::make_pair(ParamLoc, ArgVal));
363 if (II->
isStr(
"pthread_setspecific"))
368 if (II->
isStr(
"xpc_connection_set_context"))
372 if (II->
isStr(
"funopen"))
375 StringRef FName = II->
getName();
379 if (FName.endswith(
"NoCopy"))
384 if (FName.startswith(
"NS") && (FName.find(
"Insert") != StringRef::npos))
389 if (FName.startswith(
"CF") || FName.startswith(
"CG")) {
390 return StrInStrNoCase(FName,
"InsertValue") != StringRef::npos ||
391 StrInStrNoCase(FName,
"AddValue") != StringRef::npos ||
392 StrInStrNoCase(FName,
"SetValue") != StringRef::npos ||
393 StrInStrNoCase(FName,
"WithData") != StringRef::npos ||
394 StrInStrNoCase(FName,
"AppendValue") != StringRef::npos ||
395 StrInStrNoCase(FName,
"SetAttribute") != StringRef::npos;
412 const CallExpr *CE = cast_or_null<CallExpr>(getOriginExpr());
420 return getSVal(CE->
getCallee()).getAsFunctionDecl();
425 SVal ThisVal = getCXXThisVal();
426 Values.push_back(ThisVal);
429 if (
const CXXMethodDecl *D = cast_or_null<CXXMethodDecl>(getDecl())) {
450 const Expr *
Base = getCXXThisExpr();
455 SVal ThisVal = getSVal(Base);
463 const Decl *D = getDecl();
473 const MemRegion *R = getCXXThisVal().getAsRegion();
484 assert(!RegionType.
isNull() &&
"DynamicTypeInfo should always be a pointer.");
487 if (!RD || !RD->hasDefinition())
497 assert(!RD->isDerivedFrom(MD->
getParent()) &&
"Couldn't find known method");
511 if (!Result->
hasBody(Definition))
524 BindingsTy &Bindings)
const {
528 SVal ThisVal = getCXXThisVal();
546 assert(!Failed &&
"Calling an incorrectly devirtualized method");
550 Bindings.push_back(std::make_pair(ThisLoc, ThisVal));
557 return getOriginExpr()->getImplicitObjectArgument();
565 if (
const MemberExpr *ME = dyn_cast<MemberExpr>(getOriginExpr()->getCallee()))
566 if (ME->hasQualifier())
574 return getOriginExpr()->getArg(0);
579 const Expr *Callee = getOriginExpr()->getCallee();
580 const MemRegion *DataReg = getSVal(Callee).getAsRegion();
582 return dyn_cast_or_null<BlockDataRegion>(DataReg);
595 if (
const MemRegion *R = getBlockRegion())
600 BindingsTy &Bindings)
const {
603 if (isConversionFromLambda()) {
604 auto *LambdaOperatorDecl = cast<CXXMethodDecl>(CalleeCtx->
getDecl());
605 Params = LambdaOperatorDecl->parameters();
610 const VarRegion *CapturedLambdaRegion = getRegionStoringCapturedLambda();
613 Bindings.push_back(std::make_pair(ThisLoc, ThisVal));
615 Params = cast<BlockDecl>(CalleeCtx->
getDecl())->parameters();
637 BindingsTy &Bindings)
const {
640 SVal ThisVal = getCXXThisVal();
645 Bindings.push_back(std::make_pair(ThisLoc, ThisVal));
658 if (isBaseDestructor())
674 Values.push_back(getReceiverSVal());
682 return getState()->getSVal(getState()->getRegion(SelfDecl, LCtx));
687 if (!isInstanceMessage())
690 if (
const Expr *RecE = getOriginExpr()->getInstanceReceiver())
691 return getSVal(RecE);
696 SVal SelfVal = getSelfSVal();
697 assert(SelfVal.
isValid() &&
"Calling super but not in ObjC method");
706 if (!isInstanceMessage())
709 SVal RecVal = getSVal(getOriginExpr()->getInstanceReceiver());
711 return (RecVal == getSelfSVal());
715 switch (getMessageKind()) {
717 return getOriginExpr()->getSourceRange();
720 return getContainingPseudoObjectExpr()->getSourceRange();
722 llvm_unreachable(
"unknown message kind");
727 const PseudoObjectExpr *ObjCMethodCall::getContainingPseudoObjectExpr()
const {
728 assert(Data &&
"Lazy lookup not yet performed.");
729 assert(getMessageKind() !=
OCM_Message &&
"Explicit message send.");
730 return ObjCMessageDataTy::getFromOpaqueValue(Data).getPointer();
737 ParentMap &PM = getLocationContext()->getParentMap();
742 const Expr *Syntactic = POE->getSyntacticForm();
746 if (
const BinaryOperator *BO = dyn_cast<BinaryOperator>(Syntactic))
747 Syntactic = BO->getLHS();
750 switch (Syntactic->getStmtClass()) {
751 case Stmt::ObjCPropertyRefExprClass:
754 case Stmt::ObjCSubscriptRefExprClass:
766 assert(getMessageKind() == K);
778 if (!Info.getPointer())
788 getState()->getStateManager().getContext().getSourceManager();
836 llvm_unreachable(
"The while loop should always terminate.");
848 bool CanBeSubClassed =
false;
852 if (!SupersType.
isNull()) {
855 ReceiverT = cast<ObjCObjectPointerType>(SupersType);
857 Receiver = getReceiverSVal().getAsRegion();
866 if (ReceiverT && CanBeSubClassed)
868 if (!canBeOverridenInSubclass(IDecl, Sel))
869 CanBeSubClassed =
false;
889 typedef std::pair<const ObjCInterfaceDecl*, Selector>
891 typedef llvm::DenseMap<PrivateMethodKey,
895 static PrivateMethodCache PMC;
899 if (!Val.hasValue()) {
900 Val = IDecl->lookupPrivateMethod(Sel);
906 if (CompileTimeMD->isPropertyAccessor())
907 Val = IDecl->lookupInstanceMethod(Sel);
931 if (isInSystemHeader() && !isInstanceMessage()) {
943 BindingsTy &Bindings)
const {
949 SVal SelfVal = getReceiverSVal();
950 if (!SelfVal.isUnknown()) {
954 Bindings.push_back(std::make_pair(SelfLoc, SelfVal));
962 return create<CXXMemberCall>(MCE,
State, LCtx);
965 const FunctionDecl *DirectCallee = OpCE->getDirectCallee();
966 if (
const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(DirectCallee))
967 if (MD->isInstance())
968 return create<CXXMemberOperatorCall>(OpCE, State, LCtx);
971 return create<BlockCall>(CE,
State, LCtx);
976 return create<SimpleFunctionCall>(CE,
State, LCtx);
985 assert(CallerCtx &&
"This should not be used for top-level stack frames");
990 if (
const CallExpr *CE = dyn_cast<CallExpr>(CallSite))
991 return getSimpleCall(CE, State, CallerCtx);
993 switch (CallSite->getStmtClass()) {
994 case Stmt::CXXConstructExprClass:
995 case Stmt::CXXTemporaryObjectExprClass: {
996 SValBuilder &SVB = State->getStateManager().getSValBuilder();
999 SVal ThisVal = State->getSVal(ThisPtr);
1001 return getCXXConstructorCall(cast<CXXConstructExpr>(CallSite),
1004 case Stmt::CXXNewExprClass:
1005 return getCXXAllocatorCall(cast<CXXNewExpr>(CallSite), State, CallerCtx);
1006 case Stmt::ObjCMessageExprClass:
1007 return getObjCMethodCall(cast<ObjCMessageExpr>(CallSite),
1010 llvm_unreachable(
"This is not an inlineable statement.");
1019 "All other CFG elements should have exprs");
1022 SValBuilder &SVB = State->getStateManager().getSValBuilder();
1025 SVal ThisVal = State->getSVal(ThisPtr);
1027 const Stmt *Trigger;
1029 Trigger = AutoDtor->getTriggerStmt();
1031 Trigger = cast<Stmt>(DeleteDtor->getDeleteExpr());
1035 return getCXXDestructorCall(Dtor, Trigger, ThisVal.
getAsRegion(),
llvm::PointerIntPair< const PseudoObjectExpr *, 2 > ObjCMessageDataTy
bool isObjCSelType() const
ArrayRef< ParmVarDecl * > parameters() const
virtual SVal getArgSVal(unsigned Index) const
Returns the value of a given argument at the time of the call.
A call to an overloaded operator written using operator syntax.
The receiver is the instance of the superclass object.
ArrayRef< ParmVarDecl * > parameters() const
void getExtraInvalidatedValues(ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const override
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
Smart pointer class that efficiently represents Objective-C method names.
SVal evalDynamicCast(SVal Base, QualType DerivedPtrType, bool &Failed)
Evaluates C++ dynamic_cast cast.
PointerType - C99 6.7.5.1 - Pointer Declarators.
A (possibly-)qualified type.
MemRegion - The root abstract class for all memory regions.
bool canBeASubClass() const
Returns false if the type information is precise (the type T is the only type in the lattice)...
bool argumentsMayEscape() const override
Returns true if any of the arguments are known to escape to long- term storage, even if this method w...
ObjCInterfaceDecl * getClassInterface()
IdentifierInfo * getIdentifier() const
getIdentifier - Get the identifier that names this declaration, if there is one.
bool hasVoidPointerToNonConstArg() const
Returns true if any of the arguments is void*.
Information about invalidation for a particular region/symbol.
FunctionType - C99 6.7.5.3 - Function Declarators.
QualType getRValueReferenceType(QualType T) const
Return the uniqued reference to the type for an rvalue reference to the specified type...
virtual bool argumentsMayEscape() const
Returns true if any of the arguments are known to escape to long- term storage, even if this method w...
const ProgramStateRef & getState() const
The state in which the call is being evaluated.
Decl - This represents one declaration (or definition), e.g.
QualType getLValueReferenceType(QualType T, bool SpelledAsLValue=true) const
Return the uniqued reference to the type for an lvalue reference to the specified type...
CFGDeleteDtor - Represents C++ object destructor generated from a call to delete. ...
QualType getRecordType(const RecordDecl *Decl) const
SourceRange getSourceRange() const override
Represents a program point just before an implicit call event.
A container of type source information.
bool isBlockPointerType() const
CallEventRef getSimpleCall(const CallExpr *E, ProgramStateRef State, const LocationContext *LCtx)
void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override
Expr * ignoreParenBaseCasts() LLVM_READONLY
Ignore parentheses and derived-to-base casts.
VarDecl - An instance of this class is created to represent a variable declaration or definition...
const Expr * getCallee() const
loc::MemRegionVal getCXXThis(const CXXMethodDecl *D, const StackFrameContext *SFC)
Return a memory region for the 'this' object reference.
void setTrait(SymbolRef Sym, InvalidationKinds IK)
bool isReceiverSelfOrSuper() const
Checks if the receiver refers to 'self' or 'super'.
ObjCMethodDecl - Represents an instance or class method declaration.
SVal getSelfSVal() const
Return the value of 'self' if available.
static bool isVoidPointerToNonConst(QualType T)
const Expr * getCXXThisExpr() const override
Returns the expression representing the implicit 'this' object.
ArrayRef< ParmVarDecl * > parameters() const override
Return call's formal parameters.
const MemRegion * getBaseRegion() const
param_type_iterator param_type_end() const
ParmVarDecl - Represents a parameter to a function.
bool hasMutableFields() const
Determine whether this class, or any of its class subobjects, contains a mutable field.
const ImplicitParamDecl * getSelfDecl() const
Return the ImplicitParamDecl* associated with 'self' if this AnalysisDeclContext wraps an ObjCMethodD...
void getExtraInvalidatedValues(ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const override
RecordDecl - Represents a struct/union/class.
bool hasBody(const FunctionDecl *&Definition) const
Returns true if the function has a body (definition).
One of these records is kept for each identifier that is lexed.
RuntimeDefinition getRuntimeDefinition() const override
MemRegionManager & getRegionManager()
IdentifierInfo * getIdentifierInfoForSlot(unsigned argIndex) const
Retrieve the identifier at a given position in the selector.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
bool isReferenceType() const
bool isOverriding() const
Whether this method overrides any other in the class hierarchy.
bool isAnyPointerType() const
CFGAutomaticObjDtor - Represents C++ object destructor implicitly generated for automatic object or t...
virtual void getExtraInvalidatedValues(ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const
Used to specify non-argument regions that will be invalidated as a result of this call...
AnalysisDeclContext * getAnalysisDeclContext() const
const Expr * getOriginExpr() const
Returns the expression whose value will be the result of this call.
CXXMethodDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
SValBuilder & getSValBuilder()
const FunctionDecl * getAsFunctionDecl() const
getAsFunctionDecl - If this SVal is a MemRegionVal and wraps a CodeTextRegion wrapping a FunctionDecl...
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
BlockDataRegion - A region that represents a block instance.
Represents any expression that calls an Objective-C method.
virtual Kind getKind() const =0
Returns the kind of call this is.
SVal getReceiverSVal() const
Returns the value of the receiver at the time of this call.
SVal getSVal(const Stmt *S) const
Get the value of arbitrary expressions at this point in the path.
unsigned getIndex() const
QualType getSuperType() const
Retrieve the type referred to by 'super'.
const CXXRecordDecl * getParent() const
Returns the parent of this method declaration, which is the class in which this method is defined...
An x-value expression is a reference to an object with independent storage but which can be "moved"...
const CFGBlock * getCallSiteBlock() const
field_range fields() const
static void findPtrToConstParams(llvm::SmallSet< unsigned, 4 > &PreserveArgs, const CallEvent &Call)
bool isUnknownOrUndef() const
A builtin binary operation expression such as "x + y" or "x <= y".
Selector getSelector() const
const Stmt * getCallSite() const
static bool isPointerToConst(QualType Ty)
Returns true if a type is a pointer-to-const or reference-to-const with no further indirection...
const FunctionDecl * getDecl() const override
Returns the declaration of the function or method that will be called.
ProgramPoint getProgramPoint(bool IsPreVisit=false, const ProgramPointTag *Tag=nullptr) const
Returns an appropriate ProgramPoint for this call.
Represents an ObjC class declaration.
static bool isVariadic(const Decl *D)
Returns true if the given decl is known to be variadic.
detail::InMemoryDirectory::const_iterator I
CXXMethodDecl * getCorrespondingMethodInClass(const CXXRecordDecl *RD, bool MayBeBase=false)
Find the method in RD that corresponds to this one.
virtual bool canBeOverridenInSubclass(ObjCInterfaceDecl *IDecl, Selector Sel) const
Check if the selector may have multiple definitions (may have overrides).
virtual SourceRange getArgSourceRange(unsigned Index) const
Returns the source range for errors associated with this argument.
const Expr * getCXXThisExpr() const override
Returns the expression representing the implicit 'this' object.
ObjCMessageKind
Represents the ways an Objective-C message send can occur.
bool isGlobalCFunction(StringRef SpecificName=StringRef()) const
Returns true if the callee is an externally-visible function in the top-level namespace, such as malloc.
bool isInstanceMessage() const
Determine whether this is an instance message to either a computed object or to super.
ArrayRef< ParmVarDecl * > parameters() const override
CFGBlock - Represents a single basic block in a source-level CFG.
bool argumentsMayEscape() const override
const MemRegion * StripCasts(bool StripBaseCasts=true) const
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee...
Loc makeLoc(SymbolRef sym)
ArrayRef< ParmVarDecl * > parameters() const override
bool isFunctionPointerType() const
const ObjCMethodDecl * getMethodDecl() const
static bool isCallback(QualType T)
virtual const Expr * getArgExpr(unsigned Index) const
Returns the expression associated with a given argument.
BlockDecl - This represents a block literal declaration, which is like an unnamed FunctionDecl...
Expr - This represents one expression.
StringRef getName() const
Return the actual identifier string.
void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override
Stores the currently inferred strictest bound on the runtime type of a region in a given state along ...
const FunctionDecl * getDecl() const override
Returns the declaration of the function or method that will be called.
unsigned getNumArgs() const
CallEventRef getCaller(const StackFrameContext *CalleeCtx, ProgramStateRef State)
static bool isCLibraryFunction(const FunctionDecl *FD, StringRef Name=StringRef())
Returns true if the callee is an externally-visible function in the top-level namespace, such as malloc.
Represents a C++ destructor within a class.
Optional< T > getAs() const
Convert to the specified SVal type, returning None if this SVal is not of the desired type...
ObjCInterfaceDecl * getReceiverInterface() const
Retrieve the Objective-C interface to which this message is being directed, if known.
bool hasNonNullArgumentsWithType(bool(*Condition)(QualType)) const
Returns true if the type of any of the non-null arguments satisfies the condition.
void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override
param_type_iterator param_type_begin() const
Returns an iterator over the types of the call's formal parameters.
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
RuntimeDefinition getRuntimeDefinition() const override
Returns the definition of the function or method that will be called.
QualType getType() const
Returns the currently inferred upper bound on the runtime type.
An expression that sends a message to the given Objective-C object or class.
StoreManager & getStoreManager()
class LLVM_ALIGNAS(8) TemplateSpecializationType unsigned NumArgs
Represents a type template specialization; the template must be a class template, a type alias templa...
void getExtraInvalidatedValues(ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const override
CFGBaseDtor - Represents C++ object destructor implicitly generated for base object in destructor...
The result type of a method or function.
const clang::PrintingPolicy & getPrintingPolicy() const
RuntimeDefinition getRuntimeDefinition() const override
ArrayRef< ParmVarDecl * > parameters() const
void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override
Populates the given SmallVector with the bindings in the callee's stack frame at the start of this ca...
Stmt * getBody(const FunctionDecl *&Definition) const
getBody - Retrieve the body (definition) of the function.
bool isInMainFile(SourceLocation Loc) const
Returns whether the PresumedLoc for a given SourceLocation is in the main file.
static void addParameterValuesToBindings(const StackFrameContext *CalleeCtx, CallEvent::BindingsTy &Bindings, SValBuilder &SVB, const CallEvent &Call, ArrayRef< ParmVarDecl * > parameters)
Defines the runtime definition of the called function.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
void getExtraInvalidatedValues(ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const override
Encodes a location in the source.
const FunctionDecl * getDecl() const override
const TemplateArgument * iterator
const BlockDataRegion * getBlockRegion() const
Returns the region associated with this instance of the block.
const StackFrameContext * getCurrentStackFrame() const
static bool isCallStmt(const Stmt *S)
Returns true if this is a statement is a function or method call of some kind.
ProgramPoints can be "tagged" as representing points specific to a given analysis entity...
bool isValid() const
Return true if this is a valid SourceLocation object.
Represents a call to a member function that may be written either with member call syntax (e...
Represents a static or instance method of a struct/union/class.
ASTContext & getContext()
SVal - This represents a symbolic expression, which can be either an L-value or an R-value...
const Decl * getDecl() const
SourceLocation getBegin() const
virtual SourceRange getSourceRange() const
Returns a source range for the entire call, suitable for outputting in diagnostics.
RuntimeDefinition getRuntimeDefinition() const override
Tells that a region's contents is not changed.
virtual const Decl * getDecl() const
Returns the declaration of the function or method that will be called.
bool isStr(const char(&Str)[StrLen]) const
Return true if this is the identifier for the specified string.
ProgramStateRef invalidateRegions(unsigned BlockCount, ProgramStateRef Orig=nullptr) const
Returns a new state with all argument regions invalidated.
const LocationContext * getParent() const
bool isValid() const
Return false if no dynamic type info is available.
Represents a program point just after an implicit call event.
FunctionDecl * getDirectCallee()
If the callee is a FunctionDecl, return it. Otherwise return 0.
DynamicTypeInfo getDynamicTypeInfo(ProgramStateRef State, const MemRegion *Reg)
Get dynamic type information for a region.
RuntimeDefinition getRuntimeDefinition() const override
const VarRegion * getVarRegion(const VarDecl *D, const LocationContext *LC)
getVarRegion - Retrieve or create the memory region associated with a specified VarDecl and LocationC...
QualType getPointerType(QualType T) const
Return the uniqued reference to the type for a pointer to the specified type.
ProgramStateManager & getStateManager()
detail::InMemoryDirectory::const_iterator E
const MemRegion * getAsRegion() const
SourceLocation getEndOfDefinitionLoc() const
Represents an abstract call to a function or method along a particular path.
ObjCMessageKind getMessageKind() const
Returns how the message was written in the source (property access, subscript, or explicit message se...
const RecordType * getAsStructureType() const
Represents a pointer to an Objective C object.
QualType getResultType() const
Returns the result type, adjusted for references.
ObjCMethodDecl * lookupMethod(Selector Sel, bool isInstance, bool shallowCategoryLookup=false, bool followSuper=true, const ObjCCategoryDecl *C=nullptr) const
lookupMethod - This method returns an instance/class method by looking in the class, its categories, and its super classes (using a linear search).
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
const T * getAs() const
Member-template getAs<specific type>'.
ObjCInterfaceDecl * getInterfaceDecl() const
If this pointer points to an Objective @interface type, gets the declaration for that interface...
static QualType getDeclaredResultType(const Decl *D)
Returns the result type of a function or method declaration.
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
const ImplicitParamDecl * getSelfDecl() const
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Represents a C++ struct/union/class.
SVal getCXXThisVal() const override
Returns the value of the implicit 'this' object.
CFGImplicitDtor - Represents C++ object destructor implicitly generated by compiler on various occasi...
Stmt * getParentIgnoreParenCasts(Stmt *) const
virtual unsigned getNumArgs() const =0
Returns the number of arguments (explicit and implicit).
CFGElement - Represents a top-level expression in a basic block.
virtual const CallExpr * getOriginExpr() const
const LocationContext * getLocationContext() const
The context in which the call is being evaluated.
SVal getCXXThisVal() const
Returns the value of the implicit 'this' object.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
ObjCInterfaceDecl * getSuperClass() const
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
virtual SVal getCXXThisVal() const
Returns the value of the implicit 'this' object.
llvm::mapped_iterator< ArrayRef< ParmVarDecl * >::iterator, get_type_fun > param_type_iterator
An l-value expression is a reference to an object with independent storage.
A trivial tuple used to represent a source range.
SourceLocation getLocation() const
bool hasNonZeroCallbackArg() const
Returns true if any of the arguments appear to represent callbacks.
bool isConstQualified() const
Determine whether this type is const-qualified.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
The receiver is a superclass.
SVal getReturnValue() const
Returns the return value of the call.
This class handles loading and caching of source files into memory.
CFGTemporaryDtor - Represents C++ object destructor implicitly generated at the end of full expressio...
Optional< T > getAs() const
Convert to the specified CFGElement type, returning None if this CFGElement is not of the desired typ...
void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override
ArrayRef< SVal > ValueList