aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-02-08 00:23:07 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-02-08 00:23:07 +0000
commit8348de33e92b8278a07a7573eb7ad3c166c02b0d (patch)
treef6cb9a6a80f0e489a31fae4b0b2fef54f5dcb918 /lib/Sema/SemaExprObjC.cpp
parentbb699b07426be017056c2c549ac3ffb488cab6e3 (diff)
Support for objc use of property-dot syntax as receiver
in liu of a class method getter. objc++ uses a different code path and is more involved (TBD). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index eeaa45163d..11fa9eb0b4 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -675,6 +675,10 @@ Sema::ObjCMessageKind Sema::getObjCMessageKind(Scope *S,
return ObjCInstanceMessage;
case LookupResult::Found: {
+ // If the identifier is a class or not, and there is a trailing dot,
+ // it's an instance message.
+ if (HasTrailingDot)
+ return ObjCInstanceMessage;
// We found something. If it's a type, then we have a class
// message. Otherwise, it's an instance message.
NamedDecl *ND = Result.getFoundDecl();