Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Change the order of visit according to the control flow of a program in AST.

Note that Codan has code for building a control-flow graph, which it
uses for the "no return in function ..." checker. The code is in
org.eclipse.cdt.codan.internal.core.cfg.ControlFlowGraph and related
classes.

You may be able to reuse this code for your work. If you want to
refactor things in such a way that the CFG is exposed as public API, 
I'd imagine we would be happy to accept patches that do that.

Hope that helps,
Nate


________________________________
> To: cdt-dev@xxxxxxxxxxx 
> From: mkucera@xxxxxxxxxx 
> Date: Tue, 22 Apr 2014 09:49:25 -0400 
> Subject: Re: [cdt-dev] Change the order of visit according to the  
> control flow of a program in AST. 
>  
>  
> I believe you can subclass ASTVisitor and return PROCESS_SKIP in every  
> method you override. This will disable the built-in depth first  
> traversal order. Then manually call the accept() method on the child  
> nodes yourself to implement your own traversal order. You can even  
> create "sub-visitors" in the main visitor that are only meant to visit  
> specific subtrees. 
> ________________________________ 
>  
>  
> Mike Kucera 
> [https://2__=0ABBF651DFD83D3F8f9e8a93df938@xxxxxxxxxx] 
>  
> Rational Developer for AIX and Linux 
> IBM Toronto Lab 
> mkucera@xxxxxxxxxx 
>  
>  
>  
>  
> [Inactive hide details for "Babesha F. M." ---04/22/2014 07:17:56  
> AM---Hai, I want to implement  double free corruption checker]"Babesha  
> F. M." ---04/22/2014 07:17:56 AM---Hai, I want to implement  double  
> free corruption checker in C using CDT. For that I have to visit th 
>  
> From: "Babesha F. M." <babesha.fm@xxxxxxxxxxxxx> 
> To: "cdt-dev@xxxxxxxxxxx" <cdt-dev@xxxxxxxxxxx> 
> Date: 04/22/2014 07:17 AM 
> Subject: [cdt-dev] Change the order of visit according to the control  
> flow of a program in AST. 
> Sent by: cdt-dev-bounces@xxxxxxxxxxx 
> ________________________________ 
>  
>  
>  
> Hai, 
>  
> I want to implement  double free corruption checker in C using CDT. For  
> that I have to visit the AST in the order of control flow 
> of a program. Is there any method to do the same. 
>  
> Thanks and regards, 
> Babesha 
>  
>  
> ________________________________ 
>  
> Confidentiality Statement/Disclaimer : This message and any attachments  
> is intended for the sole use of the intended recipient. It may contain  
> confidential information. Any unauthorized use, dissemination or  
> modification is strictly prohibited. If you are not the intended  
> recipient, please notify the sender immediately then delete it from all  
> your systems, and do not copy, use or print. Internet communications  
> are not secure and it is the responsibility of the recipient to make  
> sure that it is virus/malicious code exempt. 
>  
> The company/sender cannot be responsible for any unauthorized  
> alterations or modifications made to the contents. If you require any  
> form of confirmation of the contents, please contact the  
> company/sender. The company/sender is not liable for any errors or  
> omissions in the content of this message. 
>  
> ________________________________ 
> _______________________________________________ 
> cdt-dev mailing list 
> cdt-dev@xxxxxxxxxxx 
> https://dev.eclipse.org/mailman/listinfo/cdt-dev 
>  
> _______________________________________________ cdt-dev mailing list  
> cdt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/cdt-dev 
 		 	   		  

Attachment: ecblank.gif
Description: GIF image

Attachment: 14803618.gif
Description: GIF image

Attachment: graycol.gif
Description: GIF image


Back to the top