forked from OSchip/llvm-project
An Obj-C message send expression can never have a reference type.
llvm-svn: 72417
This commit is contained in:
parent
a30d046059
commit
09ac6f21c3
|
@ -444,6 +444,8 @@ Sema::ExprResult Sema::ActOnClassMessage(
|
|||
lbrac, rbrac, returnType))
|
||||
return true;
|
||||
|
||||
returnType = returnType.getNonReferenceType();
|
||||
|
||||
// If we have the ObjCInterfaceDecl* for the class that is receiving the
|
||||
// message, use that to construct the ObjCMessageExpr. Otherwise pass on the
|
||||
// IdentifierInfo* for the class.
|
||||
|
@ -500,6 +502,8 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel,
|
|||
if (CheckMessageArgumentTypes(ArgExprs, NumArgs, Sel, Method, false,
|
||||
lbrac, rbrac, returnType))
|
||||
return true;
|
||||
|
||||
returnType = returnType.getNonReferenceType();
|
||||
return new (Context) ObjCMessageExpr(RExpr, Sel, returnType, Method, lbrac,
|
||||
rbrac, ArgExprs, NumArgs);
|
||||
}
|
||||
|
@ -515,6 +519,7 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel,
|
|||
if (CheckMessageArgumentTypes(ArgExprs, NumArgs, Sel, Method, false,
|
||||
lbrac, rbrac, returnType))
|
||||
return true;
|
||||
returnType = returnType.getNonReferenceType();
|
||||
return new (Context) ObjCMessageExpr(RExpr, Sel, returnType, Method, lbrac,
|
||||
rbrac, ArgExprs, NumArgs);
|
||||
}
|
||||
|
@ -556,6 +561,7 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel,
|
|||
if (CheckMessageArgumentTypes(ArgExprs, NumArgs, Sel, Method, false,
|
||||
lbrac, rbrac, returnType))
|
||||
return true;
|
||||
returnType = returnType.getNonReferenceType();
|
||||
return new (Context) ObjCMessageExpr(RExpr, Sel, returnType, Method, lbrac,
|
||||
rbrac, ArgExprs, NumArgs);
|
||||
}
|
||||
|
@ -632,6 +638,7 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel,
|
|||
if (CheckMessageArgumentTypes(ArgExprs, NumArgs, Sel, Method, false,
|
||||
lbrac, rbrac, returnType))
|
||||
return true;
|
||||
returnType = returnType.getNonReferenceType();
|
||||
return new (Context) ObjCMessageExpr(RExpr, Sel, returnType, Method, lbrac,
|
||||
rbrac, ArgExprs, NumArgs);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue