diff options
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index db9a2e238f9..3853e911e72 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -976,6 +976,16 @@ Sema::OwningExprResult Sema::BuildInstanceMessage(ExprArg ReceiverE, ImpCastExprToType(Receiver, Context.getObjCIdType(), CastExpr::CK_IntegralToPointer); ReceiverType = Receiver->getType(); + } + else if (!PerformContextuallyConvertToObjCId(Receiver)) { + return BuildInstanceMessage(Owned(Receiver), + ReceiverType, + SuperLoc, + Sel, + Method, + LBracLoc, + RBracLoc, + move(ArgsIn)); } else { // Reject other random receiver types (e.g. structs). Diag(Loc, diag::err_bad_receiver_type) |

