forked from OSchip/llvm-project
Added initial transfer function support for ObjCMessageExpr.
llvm-svn: 48757
This commit is contained in:
parent
7082a61074
commit
64100da427
|
@ -388,6 +388,14 @@ protected:
|
|||
CallExpr::arg_iterator AI, CallExpr::arg_iterator AE,
|
||||
NodeSet& Dst);
|
||||
|
||||
/// VisitObjCMessageExpr - Transfer function for ObjC message expressions.
|
||||
void VisitObjCMessageExpr(ObjCMessageExpr* ME, NodeTy* Pred, NodeSet& Dst);
|
||||
|
||||
void VisitObjCMessageExprHelper(ObjCMessageExpr* ME,
|
||||
ObjCMessageExpr::arg_iterator I,
|
||||
ObjCMessageExpr::arg_iterator E,
|
||||
NodeTy* Pred, NodeSet& Dst);
|
||||
|
||||
/// VisitCast - Transfer function logic for all casts (implicit and explicit).
|
||||
void VisitCast(Expr* CastE, Expr* Ex, NodeTy* Pred, NodeSet& Dst);
|
||||
|
||||
|
|
|
@ -1082,6 +1082,42 @@ void GRExprEngine::VisitAsmStmtHelperInputs(AsmStmt* A,
|
|||
}
|
||||
|
||||
|
||||
void GRExprEngine::VisitObjCMessageExpr(ObjCMessageExpr* ME, NodeTy* Pred,
|
||||
NodeSet& Dst){
|
||||
VisitObjCMessageExprHelper(ME, ME->arg_begin(), ME->arg_end(), Pred, Dst);
|
||||
}
|
||||
|
||||
void GRExprEngine::VisitObjCMessageExprHelper(ObjCMessageExpr* ME,
|
||||
ObjCMessageExpr::arg_iterator I,
|
||||
ObjCMessageExpr::arg_iterator E,
|
||||
NodeTy* Pred, NodeSet& Dst) {
|
||||
if (I == E) {
|
||||
|
||||
// Process the receiver.
|
||||
|
||||
Expr* Receiver = ME->getReceiver();
|
||||
NodeSet Tmp;
|
||||
VisitLVal(Receiver, Pred, Tmp);
|
||||
|
||||
// FIXME: More logic for the processing the method call.
|
||||
|
||||
for (NodeSet::iterator NI = Tmp.begin(), NE = Tmp.end(); NI != NE; ++NI)
|
||||
Dst.Add(*NI);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
NodeSet Tmp;
|
||||
Visit(*I, Pred, Tmp);
|
||||
|
||||
++I;
|
||||
|
||||
for (NodeSet::iterator NI = Tmp.begin(), NE = Tmp.end(); NI != NE; ++NI)
|
||||
VisitObjCMessageExprHelper(ME, I, E, *NI, Dst);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GRExprEngine::VisitBinaryOperator(BinaryOperator* B,
|
||||
GRExprEngine::NodeTy* Pred,
|
||||
GRExprEngine::NodeSet& Dst) {
|
||||
|
@ -1481,6 +1517,11 @@ void GRExprEngine::Visit(Stmt* S, NodeTy* Pred, NodeSet& Dst) {
|
|||
VisitCast(C, C->getSubExpr(), Pred, Dst);
|
||||
break;
|
||||
}
|
||||
|
||||
case Stmt::ObjCMessageExprClass: {
|
||||
VisitObjCMessageExpr(cast<ObjCMessageExpr>(S), Pred, Dst);
|
||||
break;
|
||||
}
|
||||
|
||||
case Stmt::ParenExprClass:
|
||||
Visit(cast<ParenExpr>(S)->getSubExpr(), Pred, Dst);
|
||||
|
|
Loading…
Reference in New Issue