More tests for Objective-C-related name lookup weirdness. Yes, it's
weird; yes, it's what GCC does. Almost.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101803 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjCXX/ivar-lookup.mm b/test/SemaObjCXX/ivar-lookup.mm
new file mode 100644
index 0000000..bb26f48
--- /dev/null
+++ b/test/SemaObjCXX/ivar-lookup.mm
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+@interface Ivar
+- (float*)method;
+@end
+
+@interface A {
+  A *Ivar;
+}
+- (int*)method;
+@end
+
+@implementation A
+- (int*)method {
+  int *ip = [Ivar method]; // Okay; calls A's method on the instance variable Ivar.
+                           // Note that Objective-C calls Ivar's method.
+  return 0;
+}
+@end