Revert Sebastian's rvalue patch (r67870) since it caused test failures in

SemaCXX//overload-member-call.cpp
SemaCXX//overloaded-operator.cpp
SemaTemplate//instantiate-method.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67912 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp
index e65b050..cc21243 100644
--- a/lib/Sema/SemaAccess.cpp
+++ b/lib/Sema/SemaAccess.cpp
@@ -55,7 +55,7 @@
   
   const CXXBaseSpecifier *InacessibleBase = 0;
 
-  CXXRecordDecl* CurrentClassDecl = 0;
+  const CXXRecordDecl* CurrentClassDecl = 0;
   if (CXXMethodDecl *MD = dyn_cast_or_null<CXXMethodDecl>(getCurFunctionDecl()))
     CurrentClassDecl = MD->getParent();
 
@@ -79,21 +79,9 @@
         if (CurrentClassDecl != Element->Class)
           FoundInaccessibleBase = true;
         break;
-      case AS_protected:
-        // FIXME: Check if the current function/class is a friend.
-        if (!CurrentClassDecl) {
-          FoundInaccessibleBase = true;
-          break;
-        }
-        
-        if (CurrentClassDecl != Element->Class) {
-          QualType CurrentClassType = Context.getTypeDeclType(CurrentClassDecl);
-          QualType ClassType = Context.getTypeDeclType(Element->Class);
-          
-          if (!IsDerivedFrom(CurrentClassType, ClassType))
-            FoundInaccessibleBase = true;
-          break;
-        }
+      case AS_protected:  
+        // FIXME: Implement
+        break;
       }
       
       if (FoundInaccessibleBase) {