Scope *S,
IdentifierInfo *receivingClassName,
Selector Sel,
- SourceLocation lbrac,
- SourceLocation receiverLoc,
+ SourceLocation lbrac, SourceLocation receiverLoc,
+ SourceLocation selectorLoc,
SourceLocation rbrac,
ExprTy **ArgExprs, unsigned NumArgs) {
return 0;
// is obtained from NumArgs.
virtual ExprResult ActOnInstanceMessage(
ExprTy *receiver, Selector Sel,
- SourceLocation lbrac, SourceLocation rbrac,
+ SourceLocation lbrac, SourceLocation selectorLoc, SourceLocation rbrac,
ExprTy **ArgExprs, unsigned NumArgs) {
return 0;
}
SourceLocation Loc;
IdentifierInfo *selIdent = ParseObjCSelector(Loc);
+ SourceLocation SelectorLoc = Loc;
+
llvm::SmallVector<IdentifierInfo *, 12> KeyIdents;
ExprVector KeyExprs(Actions);
// We've just parsed a keyword message.
if (ReceiverName)
return Owned(Actions.ActOnClassMessage(CurScope, ReceiverName, Sel,
- LBracLoc, NameLoc, RBracLoc,
+ LBracLoc, NameLoc, SelectorLoc,
+ RBracLoc,
KeyExprs.take(), KeyExprs.size()));
return Owned(Actions.ActOnInstanceMessage(ReceiverExpr.release(), Sel,
- LBracLoc, RBracLoc,
+ LBracLoc, SelectorLoc, RBracLoc,
KeyExprs.take(), KeyExprs.size()));
}
// is obtained from NumArgs.
virtual ExprResult ActOnClassMessage(
Scope *S,
- IdentifierInfo *receivingClassName, Selector Sel,
- SourceLocation lbrac, SourceLocation receiverLoc, SourceLocation rbrac,
+ IdentifierInfo *receivingClassName, Selector Sel, SourceLocation lbrac,
+ SourceLocation receiverLoc, SourceLocation selectorLoc,SourceLocation rbrac,
ExprTy **ArgExprs, unsigned NumArgs);
// ActOnInstanceMessage - used for both unary and keyword messages.
// is obtained from NumArgs.
virtual ExprResult ActOnInstanceMessage(
ExprTy *receiver, Selector Sel,
- SourceLocation lbrac, SourceLocation rbrac,
+ SourceLocation lbrac, SourceLocation receiverLoc, SourceLocation rbrac,
ExprTy **ArgExprs, unsigned NumArgs);
/// ActOnPragmaPack - Called on well formed #pragma pack(...).
Sema::ExprResult Sema::ActOnClassMessage(
Scope *S,
IdentifierInfo *receiverName, Selector Sel,
- SourceLocation lbrac, SourceLocation receiverLoc, SourceLocation rbrac,
+ SourceLocation lbrac, SourceLocation receiverLoc,
+ SourceLocation selectorLoc, SourceLocation rbrac,
ExprTy **Args, unsigned NumArgs)
{
assert(receiverName && "missing receiver class name");
ExprResult ReceiverExpr = new (Context) ObjCSuperExpr(SourceLocation(),
superTy);
// We are really in an instance method, redirect.
- return ActOnInstanceMessage(ReceiverExpr.get(), Sel, lbrac, rbrac,
- Args, NumArgs);
+ return ActOnInstanceMessage(ReceiverExpr.get(), Sel, lbrac,
+ selectorLoc, rbrac, Args, NumArgs);
}
// We are sending a message to 'super' within a class method. Do nothing,
// the receiver will pass through as 'super' (how convenient:-).
ExprResult ReceiverExpr = new (Context) DeclRefExpr(VD, VD->getType(),
receiverLoc);
// We are really in an instance method, redirect.
- return ActOnInstanceMessage(ReceiverExpr.get(), Sel, lbrac, rbrac,
- Args, NumArgs);
+ return ActOnInstanceMessage(ReceiverExpr.get(), Sel, lbrac,
+ selectorLoc, rbrac, Args, NumArgs);
}
return Diag(receiverLoc, diag::err_undeclared_var_use) << receiverName;
}
// is obtained from Sel.getNumArgs().
Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel,
SourceLocation lbrac,
+ SourceLocation receiverLoc,
SourceLocation rbrac,
ExprTy **Args, unsigned NumArgs) {
assert(receiver && "missing receiver expression");
if (ObjCInterfaceDecl *SuperDecl = ClassDecl->getSuperClass())
Method = SuperDecl->lookupInstanceMethod(Sel);
}
+
if (CheckMessageArgumentTypes(ArgExprs, NumArgs, Sel, Method, false,
lbrac, rbrac, returnType))
return true;