Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » How to find all ifs, switch cases, etc.
How to find all ifs, switch cases, etc. [message #1754567] Mon, 20 February 2017 06:20 Go to next message
Eclipse UserFriend
So traversing the hole AST with an Visitor to find all IASTIfStatements or other statements in large files is very time consuming. Is there an other way to do so? Is there a way to do that index-based?
Re: How to find all ifs, switch cases, etc. [message #1754720 is a reply to message #1754567] Tue, 21 February 2017 14:14 Go to previous message
Eclipse UserFriend
There's no way that I know of that is index-based, the index primarily stores names and type information, not control flow (well, except for callers of functions which it does store). But if by time consuming you mean that it takes long for you to type Wink maybe you could be interested in the Control Flow Graph code available in org.eclipse.cdt.codan.core.cxx.internal.model.cfg. It parses the AST for you and offers a higher level interface. But it will still be as slow, CPU-wise as it does traverse the AST as well.
Previous Topic:Where are debug launcher "source container" types documented?
Next Topic:Makefile problems
Goto Forum:
  


Current Time: Fri May 16 23:51:18 EDT 2025

Powered by FUDForum. Page generated in 0.08662 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top