[cfe-dev] c++ templates

Andrew Sutton andrew.n.sutton at gmail.com
Thu Nov 13 09:31:57 PST 2008


I'm working on a set of reverse engineering  tools (as in program analysis,
not the illegal kind) that operate on template source code and have decided
to use clang for its implementation. Imagine my surprise when I found out
that clang doesn't quite support templates. Rather than wait for somebody
else to build it, I decided I would try to do this myself. How hard can it
be :)

Attached is a very (VERY) preliminary stab at the beginning of template
parsing for clang. It's not complete, it doesn't do anything, there's no AST
stuff, I haven't even considered scopes and name resolution, etc., etc. It
just recognizes "template <...>". I had hoped to spend some spare time, an
hour or so a day (whenever possible) to continue working on this. Please
bear in mind that a) I've never worked on a real compiler before and b) I
probably don't fully understand the requirements of what I'm working on.

I hope this is an adequate start.

Andrew Sutton
andrew.n.sutton at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20081113/b3ba8f05/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: templates.diff
Type: application/octet-stream
Size: 70799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20081113/b3ba8f05/attachment.obj>


More information about the cfe-dev mailing list