[cfe-dev] [patch] small patch to parse "using" declaration

Paweł Hajdan jr phajdan.jr at gmail.com
Fri May 29 09:28:01 PDT 2009


Hi. I was reading a lot about LLVM, and recently encountered clang.
I'm very excited about the idea of library-based compiler design and
possibilities it enables.

I compiled clang from svn and played around a bit. I was looking for a
small task to contribute, and it seems that parsing the using
declaration is relatively easy (I'm generally interested in C++
support, static analysis, and contributing).

I'm attaching a simple patch which allows a snippet like

namespace test {
class A {};
}

using test::A;

to pass -fsyntax-only. Passes make test.

I think this patch is not yet ready to be merged. Please help me to
improve it. I see two problems right away:
- I'm using ParseClassName, but in that place I think it should also
be acceptable to have a struct, function, variable, probably
anything... How should I deal with that?
- how do I add a trivial test for this parsing (just for -fsyntax-check)?

Thanks,
Paweł Hajdan jr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 1106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090529/f696cad8/attachment.obj>


More information about the cfe-dev mailing list