如何利用锵的AST的? [英] How to make use of Clang's AST?

查看:136
本文介绍了如何利用锵的AST的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在看利用了锵的AST为我的C code和做在AST一些分析。就从哪里开始一些指针,如何获取锵的AST,辅导或任何在这方面将有很大的帮助!

I am looking at making use of the Clang's AST for my C code and do some analysis over the AST. Some pointers on where to start, how to obtain the Clang's AST, tutorials or anything in this regard will be of great help!!!

我一直在试图找到一些和我这是在2本链接几年前。但由于某些原因,它不是为我工作。样品code,在本教程中,给了我太多的错误。所以,我不知道,如果我建code正确或某些事情是错误的教程。不过,我会很乐意从其他页面开始为好。

I have been trying to find some and I got this link which was created 2 years back. But for some reason, it is not working for me. The sample code, in the tutorial, gives me too many errors. So I am not sure, if I build the code properly or some thing is wrong with the tutorial. But I would be happy to start from some other page as well.

推荐答案

开始与沙尔斯链接的教程。然后通过锵的Doxygen的。开始 SemaConsumer

Start with the tutorial linked by sharth. Then go through Clang's Doxygen. Start with SemaConsumer.

看了很多源$ C ​​$ C的。铛是一个移动的目标。如果您是基于铿锵书写工具,那么你需要认识到,铛是增加和日常固定的功能,所以你应该ppared阅读大量$ C $的C $ P $!

Read a lot of source code. Clang is a moving target. If you are writing tools based on clang, then you need to recognize that clang is adding and fixing features daily, so you should be prepared to read a lot of code!

这篇关于如何利用锵的AST的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆