[cfe-dev] Ownership of Stmts and Exprs, and destroying them
Sebastian Redl
sebastian.redl at getdesigned.at
Tue Nov 25 02:20:10 PST 2008
OK, revised version of the patch. AstGuard is now ASTGuard<Destroyer>,
with typedef ExprGuard and StmtGuard.
AstArrayGuard now holds and owns (in fact, derives from) the SmallVector
and was renamed to ASTVector, with template aliases (derived classes)
ExprVector<unsigned N> and StmtVector<unsigned N>.
This has greatly simplified its use, as long as people remember that you
have to explicitly give up ownership with take() instead of using &ar[0]
to pass the content to the Sema.
Sebastian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: parser-leak.patch
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20081125/9ad55bfa/attachment.ksh>
More information about the cfe-dev
mailing list