Allocate the SubExprs array in ObjCMessageExpr using the allocator associated with ASTContext.  This fixes yet another leak (<rdar://problem/7639260>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95930 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp
index dde4b0f..a2dd8d3 100644
--- a/lib/Frontend/RewriteObjC.cpp
+++ b/lib/Frontend/RewriteObjC.cpp
@@ -1159,7 +1159,7 @@
     // This allows us to handle chain/nested property getters.
     Receiver = PropGetters[PRE];
   }
-  MsgExpr = new (Context) ObjCMessageExpr(dyn_cast<Expr>(Receiver),
+  MsgExpr = new (Context) ObjCMessageExpr(*Context, dyn_cast<Expr>(Receiver),
                                 PDecl->getSetterName(), PDecl->getType(),
                                 PDecl->getSetterMethodDecl(),
                                 SourceLocation(), SourceLocation(),
@@ -1188,7 +1188,7 @@
     // This allows us to handle chain/nested property getters.
     Receiver = PropGetters[PRE];
   }
-  MsgExpr = new (Context) ObjCMessageExpr(dyn_cast<Expr>(Receiver),
+  MsgExpr = new (Context) ObjCMessageExpr(*Context, dyn_cast<Expr>(Receiver),
                                 PDecl->getGetterName(), PDecl->getType(),
                                 PDecl->getGetterMethodDecl(),
                                 SourceLocation(), SourceLocation(),