Check access for the implicit calls to destructors that occur when we
have a temporary object in C++.

Also fix a tag mismatch that Doug noticed.

llvm-svn: 100593
diff --git a/clang/test/CXX/class.access/p4.cpp b/clang/test/CXX/class.access/p4.cpp
index 3bbdbab..434d8e4 100644
--- a/clang/test/CXX/class.access/p4.cpp
+++ b/clang/test/CXX/class.access/p4.cpp
@@ -327,3 +327,15 @@
     (void) d->x;
   }
 }
+
+// Destructors for temporaries.
+namespace test14 {
+  class A {
+  private: ~A(); // expected-note {{declared private here}}
+  };
+  A foo();
+
+  void test() {
+    foo(); // expected-error {{temporary of type 'test14::A' has private destructor}}
+  }
+}