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
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();
--- /dev/null
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// rdar://8962253
+
+@interface Singleton {
+}
++ (Singleton*) instance;
+@end
+
+@implementation Singleton
+
+- (void) someSelector { }
+
++ (Singleton*) instance { return 0; }
+
++ (void) compileError
+{
+ [Singleton.instance someSelector]; // clang issues error here
+}
+
+@end
+