Various small fixes for construction/destruction of Objective-C++
instance variables:
  - Use isRecordType() rather than isa<RecordType>(), so that we see
  through typedefs in ivar types.
  - Mark the destructor as referenced
  - Perform C++ access control on the destructor


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104206 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenObjCXX/encode.mm b/test/CodeGenObjCXX/encode.mm
index 4f472ca..83fb31e 100644
--- a/test/CodeGenObjCXX/encode.mm
+++ b/test/CodeGenObjCXX/encode.mm
@@ -5,7 +5,8 @@
 // CHECK: v24@0:816
 
 template <typename T1, typename T2, typename T3> struct vector {
-    vector(T1,T2,T3);
+  vector();
+  vector(T1,T2,T3);
 };
 
 typedef vector< float, float, float > vector3f;
diff --git a/test/SemaCXX/vararg-adl.cpp b/test/SemaCXX/vararg-adl.cpp
new file mode 100644
index 0000000..10b1b62
--- /dev/null
+++ b/test/SemaCXX/vararg-adl.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin -verify %s
+
+// PR6762
+#define a_list __builtin_va_list
+extern a_list l;
+extern int f (a_list arg);
+namespace n {
+int f(a_list arguments);
+void y() {
+  f(l);
+}
+}
diff --git a/test/SemaObjCXX/ivar-construct.mm b/test/SemaObjCXX/ivar-construct.mm
new file mode 100644
index 0000000..da066e9
--- /dev/null
+++ b/test/SemaObjCXX/ivar-construct.mm
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+struct Y { 
+  Y(); 
+
+private:
+  ~Y(); // expected-note 3{{declared private here}}
+};
+
+template<typename T>
+struct X : T { }; // expected-error 2{{private destructor}}
+
+struct Z; // expected-note{{forward declaration}}
+
+@interface A {
+  X<Y> x; // expected-note{{implicit default destructor}}
+  Y y; // expected-error{{private destructor}}
+}
+@end
+
+@implementation A // expected-note{{implicit default constructor}}
+@end
+
+@interface B {
+  Z z; // expected-error{{incomplete type}}
+}
+@end
+
+@implementation B
+@end