X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=djaQjmahFl6AGCI4
	iXK1CfNm5CrIIPxE9DrnNhs0zyjUkVqS748fgvfw0EgKezXjMvTKcvUjot+pLZ/e
	tNlikNTFDv2ZlaXrShMl1LoM2edH4AU+L9qdipqAcs11LYnCMc4+rZtbbeR3XnS1
	SQAaqXWVrVRaivt3IbfwHmKyAjQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=Q+VggzSuCE9asWYueuVAeN
	soGTc=; b=KTiQsLdurm4k7PPsuCVEMLQHWzXtXK8t4OX+GUcHJQF4oJKN1QD7bC
	t6wV8cnIZilCkP1cPRmsPAzhQDtnmQIFPforKQkB6uu9F5Wp1nl27N6nqU/XboYj
	1s6JfLcFucmO3s1I424615KcfQkXFoL42V5mHV/ywQk/wsZztzns0=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2
X-HELO: proxy.razorcat.com
Subject: Re: Life time of AST elements.
To: cygwin@cygwin.com
References: <561BA976.6050405@razorcat.de>
From: Frank Redeker <f.redeker@razorcat.de>
Message-ID: <561BAA3B.2080301@razorcat.de>
Date: Mon, 12 Oct 2015 14:40:27 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <561BA976.6050405@razorcat.de>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Am 12.10.2015 um 14:37 schrieb Frank Redeker:
> Hello all,
> 
> I'm writing a tool to analyze the call hierarchy of functions (methods)
> using ClangTool.
> 
> My idea is to collect the TranslationUnitDecls given to my own
> ASTCosumer's HandleTranslationUnit method and traverse them later when
> ClangTool.run() has finished.
> 
> But it seems that the AST nodes are no longer valid after
> ClangTool.run() has returned. (e.g. If I call getQualifiedNameAsString()
> on a FunctionDecl object retrieved from the TranslationUnitDecl, I get
> `Assertion failed: DC && "This decl is not contained in a translation
> unit!"`)
> 
> So I wonder if there is any trick to extend the life time for the AST or
> should I use ClangTool.buildAST() rather then ClangTool.run() to get the
> ASTs ?
> 
Sorry,

wrong mailing list!


Frank


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

