[cfe-commits] r58244 - in /cfe/trunk: include/clang/AST/Decl.h lib/AST/TranslationUnit.cpp test/SemaCXX/fntype-decl.cpp

Doug Gregor doug.gregor at gmail.com
Mon Oct 27 07:32:23 PDT 2008


On Mon, Oct 27, 2008 at 10:22 AM, Ted Kremenek <kremenek at apple.com> wrote:
>
> On Oct 27, 2008, at 5:50 AM, Douglas Gregor wrote:
>
> Author: dgregor
> Date: Mon Oct 27 07:50:38 2008
> New Revision: 58244
>
> URL: http://llvm.org/viewvc/llvm-project?rev=58244&view=rev
> Log:
> When destroying a translation unit, deallocate its owned declarations in
> reverse order, because there may be dependencies among the declarations.
>
> Hi Doug,
> Do you have a concrete case of why this is necessary?  It seems to me that a
> solid ownership policy in the ASTs wouldn't require this to be in place.  I
> feel like I'm being naive about something very basic.

Yeah, test/SemaCXX/fntype-decl.cpp causes the problem, but you'll need
to run under valgrind to see it. Argiris describes the issue here:

  http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20081020/008535.html

  - Doug



More information about the cfe-commits mailing list