[cfe-commits] r58100 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaCXX/fntype-decl.cpp
kremenek at apple.com
Sat Oct 25 14:38:06 CDT 2008
On Oct 25, 2008, at 2:07 AM, Argiris Kirtzidis wrote:
>> It does seem odd that we're destroying the TypedefDecl before
>> destroying the FunctionDecl but I'll look into it.
> TranslationUnit destroys the decls at the order of receiving them,
> should that be reverse order ?
The order shouldn't matter if we have a clear ownership policy. While
TranslationUnit may free AST nodes in a particular order, there's no
reason to expect that when clients create and free AST nodes that they
do it in a particular order either. The only requirement is that
memory that is freed is no longer accessed.
More information about the cfe-commits