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.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to