[patch] small patch to parse "using" declaration

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

patch (1.08 KB)

Pawe³ Hajdan jr wrote:

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.
  

Hi Pawel,

Great to have you here.

Now, someone already did a lot of work on using declarations. I wonder
what happened to that work.

Sebastian

Sorry, that was me. I’ve been pulled off the Clang work I was doing for some firefighting elsewhere, but I hope be back at it next week, unless you want to hand it off to someone else.

-John

2009/5/29 Sebastian Redl <sebastian.redl@getdesigned.at>

Ok then. If the patch is still useful, I can fix the issues with it
after review.

I'll look for some other task hopefully.

Thanks,
Pawe³

Pawe³ Hajdan jr wrote:

Ok then. If the patch is still useful, I can fix the issues with it
after review.

I'll look for some other task hopefully.

Thanks,
Pawe³

Sorry, that was me. I've been pulled off the Clang work I was doing for
some firefighting elsewhere, but I hope be back at it next week, unless you
want to hand it off to someone else.
    

I think you two should coordinate on this.

Sebastian