]> granicus.if.org Git - clang/commit
Change Sema::ActOnCallExpr to construct the CallExpr early and put it into
authorChris Lattner <sabre@nondot.org>
Fri, 28 Dec 2007 05:29:59 +0000 (05:29 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 28 Dec 2007 05:29:59 +0000 (05:29 +0000)
commit925e60d3fa706f31886027c876989af79eb0e0d2
treeae3377bf919f99b39f2579a71d708c8f61e44738
parentc063e436184ac900ef3ac70f54f9b53fd3c25e08
Change Sema::ActOnCallExpr to construct the CallExpr early and put it into
and OwningPtr instead of constructing only after all of sema is done.  This
has a couple of effects:
1. it fixes memory leaks from all the error cases in sema
2. it simplifies the code significantly.

The cost of this is that the error case now new's and delete's an expr where
it did not before, but we don't care about the perf of the error case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45380 91177308-0d34-0410-b5e6-96231b3b80d8
Sema/Sema.h
Sema/SemaChecking.cpp
Sema/SemaExpr.cpp