[cfe-dev] clang documents
Zhe Chen
mr.zhechen at gmail.com
Fri Mar 9 01:23:19 PST 2012
> On 3/8/2012 1:26 PM, John Criswell wrote:
>>
>> On 3/8/12 6:38 AM, Zhe Chen wrote:
>>>
>>> Dear collegues,
>>> I would like to study clang for code analysis research. For
>>> example, I need to traverse and even instrument the generated AST.
>>> However, I am now a beginner to clang. I don't know where to
>>> start, e.g. reading its code base. I would like to know if somebody
>>> has documents on clang's architecture and modules. I don't think that
>>> clang API documents (http://clang.llvm.org/doxygen/) are good for
>>> beginners. Maybe I need more detailed explainations. Please give me
>>> some suggestions.
>>> Thanks!
>>
>> Have you examined the documentation on the Clang web page (such as
>> http://clang.llvm.org/docs/InternalsManual.html)?
>
>
> I'm finding it useful to stick to the C interface to Clang, as opposed to
> jumping straight
> in to the full codebase. The C interface is I guess meant to be minimal but
> fairly
> complete, so it's a lot easier to follow the intended usages, and to get
> familiar
> with what are the core components.
>
> Writing some sample code using just the APIs exposed in
> 'include/clang-c/Index.h'
> is, I think, the easiest way to get going.
>
>
> Kevin
Yes, I have carefully read the full internals Manual. I think
that it only introduces the major internal design decisions made in
Clang, rather than detailed modules or classes. But I am trying to
understand the architecture of Clang's codebase.
About the C interface to Clang in 'include/clang-c/Index.h', I
have some questions:
1. where can I find the implementation of the functions defined in index.h ?
2. how these C style interfaces can be used ? where can I find some examples?
More information about the cfe-dev
mailing list