diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-05-13 17:19:25 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-05-13 17:19:25 +0000 |
commit | 3ba606199be8056ae83596260bd6fd5872942905 (patch) | |
tree | b28eae869f2198521a993ff221980a285e54149d /lib/Sema/SemaExprObjC.cpp | |
parent | 6fb745bdf1ff1e32caf07e42093a7920726892c1 (diff) |
Objective-C++ Sema. Fix a bug in instantiation of receivers.
Completes radar 7963410.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index 3853e911e7..eb60011ec3 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -977,7 +977,12 @@ Sema::OwningExprResult Sema::BuildInstanceMessage(ExprArg ReceiverE, CastExpr::CK_IntegralToPointer); ReceiverType = Receiver->getType(); } - else if (!PerformContextuallyConvertToObjCId(Receiver)) { + else if (getLangOptions().CPlusPlus && + !PerformContextuallyConvertToObjCId(Receiver)) { + if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Receiver)) { + Receiver = ICE->getSubExpr(); + ReceiverType = Receiver->getType(); + } return BuildInstanceMessage(Owned(Receiver), ReceiverType, SuperLoc, |