It may be possible to do this more simply by looking at just
RecursiveASTVisitor and properly understanding the couple patterns it
uses to traverse the whole AST.

--Sean Silva

On Wed, Jul 18, 2012 at 11:38 AM, Joshua Cranmer <[email protected]> wrote:
> On 7/17/2012 11:51 PM, Sean Silva wrote:
>>>
>>> On the contrary, I actually like having line/column numbers so I can
>>
>> match things up with where they are in the source tree.
>>
>> This is usually unnecessary in my experience (at least while learning)
>> because usually the stuff you feed it to be dumped will only contain
>> one use of a give identifier or number, which uniquely tracks the node
>> back to the source.
>>
>>> My attempt to do a similar thing for clang ended up failing extremely
>>
>> miserably.
>>
>> any diagnosis as to why it failed?
>
> <https://github.com/jcranmer/viewsource/tree/master/native-tools> has my
> attempt to make this work. The clang tree didn't follow rigorous enough
> design standards to make scraping names possible without more than a few
> hacks, and the fact that half the methods start by declaring assertions
> means I need to have very long guard lists or actually scrape assertion code
> from building clang.
>
>
> --
> Joshua Cranmer
> News submodule owner
> DXR coauthor
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to