When finishing a function definition, leave the function definition *after*
doing all the cleanup tasks and checks.  This gives us the proper context for
checking access to base and member destructors.

llvm-svn: 99559
diff --git a/clang/test/CXX/class.access/p4.cpp b/clang/test/CXX/class.access/p4.cpp
index 0c87c07..07ecc6c 100644
--- a/clang/test/CXX/class.access/p4.cpp
+++ b/clang/test/CXX/class.access/p4.cpp
@@ -283,3 +283,15 @@
     };
   };
 }
+
+namespace test11 {
+  class A {
+    protected: virtual ~A();
+  };
+
+  class B : public A {
+    ~B();
+  };
+
+  B::~B() {};
+}