When computing the effective context for access control,
make sure we walk up the DC chain for the current context,
rather than allowing ourselves to get switched over to the
canonical DC chain.  Fixes PR13642.

llvm-svn: 162616
diff --git a/clang/test/CXX/class.access/class.protected/p1.cpp b/clang/test/CXX/class.access/class.protected/p1.cpp
index c9491e1..132ff61 100644
--- a/clang/test/CXX/class.access/class.protected/p1.cpp
+++ b/clang/test/CXX/class.access/class.protected/p1.cpp
@@ -423,7 +423,7 @@
 // This friendship is not considered because a public member of A is
 // inaccessible in C.
 namespace test13 {
-  class A { protected: int foo(); }; // expected-note {{can only access this member on an object of type}}
+  class A { protected: int foo(); }; // expected-note {{declared protected here}}
   class B : private virtual A {};
   class C : private B { friend void test(); };
   class D : public virtual A {};