[cfe-dev] WIP patch for qualified-ids in class member access
James Porter
porterj at alum.rit.edu
Mon Jul 6 21:27:14 PDT 2009
Hi all. I've been following the clang project passively for a little
while, and figured it was time to start contributing a bit. After
hacking around for a while to get familiar with the code, I took a look
at the open projects list and settled on getting qualified name lookup
for class members working in C++.
In the interest of making sure I'm headed down the right path, and that
I'm not violating any obvious stylistic conventions in clang, I thought
it would be a good idea for other people to look at my code. With that
in mind, attached is the beginnings of a patch to add support for this
feature, along with a test for the parts that work as expected so far.
Currently, the patch does not support qualified-id lookup for dependent
types or for classes with an overloaded operator->. The latter should be
straightforward to add, but the former is a bit trickier, since I'm not
familiar with how clang handles class templates yet. There are also
likely some bugs with handling templates inside the qualified-id, but I
haven't had a chance to look at that yet. Finally, I haven't handled the
actual lookup of the members, only the nested-name-specifier part.
Hopefully this patch is more-or-less correct, even though it's not
complete yet. Comments are, of course, welcome (in fact, they're
requested!).
- Jim
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qualified-ids.patch
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090706/b84f03a9/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qual-id-test.cpp
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090706/b84f03a9/attachment-0001.ksh>
More information about the cfe-dev
mailing list