diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-04-21 20:22:17 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-04-21 20:22:17 +0000 |
commit | 46ddd12e6bc915051322ab6ddd6101216fd21086 (patch) | |
tree | 86f814b3d281ce351a64a5689461c87567e1b568 /lib/Sema/SemaPseudoObject.cpp | |
parent | b36744fe467ec4f7adbce29a5f4f3f77c7ea695d (diff) |
Objective-C. Patch to allow use of dot syntax on class
objects to fund root class's instance methods.
// rdar://16650575
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206781 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r-- | lib/Sema/SemaPseudoObject.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp index de02fa935e..a8463cdbd4 100644 --- a/lib/Sema/SemaPseudoObject.cpp +++ b/lib/Sema/SemaPseudoObject.cpp @@ -681,7 +681,8 @@ ExprResult ObjCPropertyOpBuilder::buildGet() { // Build a message-send. ExprResult msg; - if (Getter->isInstanceMethod() || RefExpr->isObjectReceiver()) { + if ((Getter->isInstanceMethod() && !RefExpr->isClassReceiver()) || + RefExpr->isObjectReceiver()) { assert(InstanceReceiver || RefExpr->isSuperReceiver()); msg = S.BuildInstanceMessageImplicit(InstanceReceiver, receiverType, GenericLoc, Getter->getSelector(), @@ -750,7 +751,8 @@ ExprResult ObjCPropertyOpBuilder::buildSet(Expr *op, SourceLocation opcLoc, // Build a message-send. ExprResult msg; - if (Setter->isInstanceMethod() || RefExpr->isObjectReceiver()) { + if ((Setter->isInstanceMethod() && !RefExpr->isClassReceiver()) || + RefExpr->isObjectReceiver()) { msg = S.BuildInstanceMessageImplicit(InstanceReceiver, receiverType, GenericLoc, SetterSelector, Setter, MultiExprArg(args, 1)); |