forked from OSchip/llvm-project
Revert "Remove unused member (& consequently unused parameter) in SA's Call code."
...and instead add an accessor. We're not using this today, but it's something that should probably stay in the source for potential clients, and it doesn't cost a lot. (ObjCPropertyAccess is only created on the stack, and right now there's only ever one alive at a time.) This reverts r159581 / commit 8e674e1da34a131faa7d43dc3fcbd6e49120edbe. llvm-svn: 159595
This commit is contained in:
parent
3bf1d5d1de
commit
62146f67b7
|
@ -405,13 +405,16 @@ public:
|
|||
///
|
||||
/// Example: obj.prop += 1;
|
||||
class ObjCPropertyAccess : public ObjCMethodCall {
|
||||
const ObjCPropertyRefExpr *PropE;
|
||||
SourceRange EntireRange;
|
||||
|
||||
public:
|
||||
ObjCPropertyAccess(SourceRange range, const ObjCMessageExpr *Msg,
|
||||
const ProgramStateRef St, const LocationContext *LCtx)
|
||||
: ObjCMethodCall(Msg, St, LCtx, CE_ObjCPropertyAccess), EntireRange(range)
|
||||
{}
|
||||
ObjCPropertyAccess(const ObjCPropertyRefExpr *pe, SourceRange range,
|
||||
const ObjCMessageExpr *Msg, const ProgramStateRef St,
|
||||
const LocationContext *LCtx)
|
||||
: ObjCMethodCall(Msg, St, LCtx, CE_ObjCPropertyAccess), PropE(pe),
|
||||
EntireRange(range)
|
||||
{}
|
||||
|
||||
/// \brief Returns true if this property access is calling the setter method.
|
||||
bool isSetter() const {
|
||||
|
@ -422,6 +425,10 @@ public:
|
|||
return EntireRange;
|
||||
}
|
||||
|
||||
const ObjCPropertyRefExpr *getPropertyExpr() const {
|
||||
return PropE;
|
||||
}
|
||||
|
||||
static bool classof(const CallEvent *CA) {
|
||||
return CA->getKind() == CE_ObjCPropertyAccess;
|
||||
}
|
||||
|
|
|
@ -881,8 +881,9 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred,
|
|||
if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(syntactic))
|
||||
syntactic = BO->getLHS();
|
||||
|
||||
if (isa<ObjCPropertyRefExpr>(syntactic)) {
|
||||
VisitObjCMessage(ObjCPropertyAccess(PO->getSourceRange(), ME,
|
||||
if (const ObjCPropertyRefExpr *PR =
|
||||
dyn_cast<ObjCPropertyRefExpr>(syntactic)) {
|
||||
VisitObjCMessage(ObjCPropertyAccess(PR, PO->getSourceRange(), ME,
|
||||
Pred->getState(), LCtx),
|
||||
Pred, Dst);
|
||||
evaluated = true;
|
||||
|
|
Loading…
Reference in New Issue