Fix some memory allocation/deallocation issues

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76783 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 3681709..3bb1657 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -497,7 +497,7 @@
 
       // Delete the duplicate base class specifier; we're going to
       // overwrite its pointer later.
-      delete Bases[idx];
+      Context.Deallocate(Bases[idx]);
 
       Invalid = true;
     } else {
@@ -513,7 +513,7 @@
   // Delete the remaining (good) base class specifiers, since their
   // data has been copied into the CXXRecordDecl.
   for (unsigned idx = 0; idx < NumGoodBases; ++idx)
-    delete Bases[idx];
+    Context.Deallocate(Bases[idx]);
 
   return Invalid;
 }