[cfe-dev] index library

Andrew Sutton andrew.n.sutton at gmail.com
Tue Jan 5 17:51:16 PST 2010

I spent yesterday morning hacking out a Python wrapper for the CIndex
library (using ctypes). It seemed like a quick and easy way to pull data
from C/C++ files... It's very much a first attempt. Probably not great, but
it seems to work so far. I can make the code available if anybody's
interested. Anyhow, I ran into a couple of problems that I couldn't quite
resolve on my own.

When I tried to compile a simple program with some templates (clang
-emit-ast), clang fails with an 'Unexepcted DeclType', which I've taken to
mean that PCHWriter (and probably PCHReader) don't support the necessary
visitors for TemplateDecl or Decl's with associated TemplateDecls.

I was going to take a shot at encoding templates into PCH's when I realized
that I have absolutely no idea what is actually supposed to go into a PCH or
AST file. In fact, it didn't like there was a lot support for C++ Decls in
the PCHWriter/Reader. I was just curious what the plans are for these AST
objects. Are there any? What needs to be supported?

Andrew Sutton
andrew.n.sutton at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100105/0a5a050d/attachment.html>

More information about the cfe-dev mailing list