Perform access control even for the implicit destructor calls from implicit
destructor definitions.  Remove some code duplication.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98611 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/virtual-member-functions.cpp b/test/SemaTemplate/virtual-member-functions.cpp
index 8df808d..59df3c2 100644
--- a/test/SemaTemplate/virtual-member-functions.cpp
+++ b/test/SemaTemplate/virtual-member-functions.cpp
@@ -36,10 +36,10 @@
 
 template<typename T>
 struct Derived : Base<T> {
-  virtual void foo() { } // expected-note {{in instantiation of member function 'Base<int>::~Base' requested here}}
+  virtual void foo() { }
 };
 
-template struct Derived<int>;
+template struct Derived<int>; // expected-note {{in instantiation of member function 'Base<int>::~Base' requested here}}
 
 template<typename T>
 struct HasOutOfLineKey {