Teach CXXRecordDecl::hasIrrelevantDestructor to check the base classes and
data members for deleted or user-provided destructors.

Now it's computed in advance, serialize it, and in passing fix all the other
record DefinitionData flags whose serialization was missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151441 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/PCH/cxx0x-default-delete.cpp b/test/PCH/cxx0x-default-delete.cpp
index 3ecb19c..6eb65d6 100644
--- a/test/PCH/cxx0x-default-delete.cpp
+++ b/test/PCH/cxx0x-default-delete.cpp
@@ -12,6 +12,14 @@
   void bar() = delete; // expected-note{{deleted here}}
 };
 
+struct baz {
+  ~baz() = delete; // expected-note{{deleted here}}
+};
+
+class quux {
+  ~quux() = default; // expected-note{{private here}}
+};
+
 #else
 
 foo::foo() { } // expected-error{{definition of explicitly defaulted default constructor}}
@@ -20,4 +28,7 @@
   f.bar(); // expected-error{{deleted function}}
 }
 
+baz bz; // expected-error{{deleted function}}
+quux qx; // expected-error{{private destructor}}
+
 #endif