Allocate the subexpression array for OberloadExpr from ASTContext's allocator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64145 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 904fe5f..e541bb8 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1410,6 +1410,13 @@
Expr::Destroy(C);
}
+void OverloadExpr::Destroy(ASTContext& C) {
+ DestroyChildren(C);
+ C.Deallocate(SubExprs);
+ this->~OverloadExpr();
+ C.Deallocate(this);
+}
+
//===----------------------------------------------------------------------===//
// DesignatedInitExpr
//===----------------------------------------------------------------------===//