Fix <rdar://problem/6655054> clang issues bogus error on property usage in a dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66659 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 9534f73..9a86d65 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1866,11 +1866,9 @@
 
     // If this reference is in an @implementation, check for 'private' methods.
     if (!Getter)
-      if (ObjCMethodDecl *CurMeth = getCurMethodDecl())
-        if (ObjCInterfaceDecl *ClassDecl = CurMeth->getClassInterface())
-          if (ObjCImplementationDecl *ImpDecl =
-              ObjCImplementations[ClassDecl->getIdentifier()])
-            Getter = ImpDecl->getInstanceMethod(Sel);
+      if (ObjCImplementationDecl *ImpDecl =
+          ObjCImplementations[IFace->getIdentifier()])
+        Getter = ImpDecl->getInstanceMethod(Sel);
 
     // Look through local category implementations associated with the class.
     if (!Getter) {
@@ -1893,11 +1891,9 @@
     if (!Setter) {
       // If this reference is in an @implementation, also check for 'private'
       // methods.
-      if (ObjCMethodDecl *CurMeth = getCurMethodDecl())
-        if (ObjCInterfaceDecl *ClassDecl = CurMeth->getClassInterface())
-          if (ObjCImplementationDecl *ImpDecl =
-                ObjCImplementations[ClassDecl->getIdentifier()])
-            Setter = ImpDecl->getInstanceMethod(SetterSel);
+      if (ObjCImplementationDecl *ImpDecl =
+          ObjCImplementations[IFace->getIdentifier()])
+        Setter = ImpDecl->getInstanceMethod(SetterSel);
     }
     // Look through local category implementations associated with the class.
     if (!Setter) {