Incomplete cursor traversal in libclang

Hey folks,

I've been bashing my head over this for several days, so I'm hoping one
of you can lend a hand. When using the C interface to clang, I am unable
to get some nested cursors which should exist. The example I'll use is
one particular instance described below:

struct foo
{
  int num{ 42 };
  int age{ num };
};

The FieldDecl for `age` should also have a nested MemberRef (or
similar), but it doesn't. The clang ast dump, on the other hand, shows
that this information is available. See my gist below.

1. Is this information available, but I'm missing something?
2. If it's not available, should it be added to 3.6?

Note, I'm currently using: clang version 3.5.0 (tags/RELEASE_350/final)

Extended information, including a testcase (code quality is that of a
testcase and should not be a concern):

Cheers,
Jeaye

Folks,

I have been digging around in libclang, trying to get these issues
resolved myself. I _have_ managed to fix the specific issue I mentioned
above, but there are still several incomplete cursor traversals I am
seeing in libclang.

In hopes of not only getting these fixes in, but also getting some help
with these problems, I'm linking two commits which have been proven to
solve to separate issues for me. These commits are based on and work
with the latest clang/llvm master.

Field decl init: (as shown above)
commit:
  Visit in-class initializers in field decls · jeaye/clang@7fc5ad7 · GitHub
diff:
  https://github.com/jeaye/clang/commit/7fc5ad762dfc9c3da56c5a10c9c5990e4da4a254.diff

Lambda function params:
commit:
  Always try to visit lambda params and ret type · jeaye/clang@d5e32aa · GitHub
diff:
  https://github.com/jeaye/clang/commit/d5e32aa70903556a5181f45ee6b9975864b890ba.diff

I'm keeping a list of still existing issues here:
  Incorrect/missing highlighting · Issue #2 · jeaye/color_coded · GitHub

I'd really love some help finding and fixing them. So far, I've asked on
two IRC networks (for over a week) and I've had this message in the
mailing list (for over a week) about these issues. Not once an acknowledgement.

Cheers,
Jeaye

I have been digging around in libclang, trying to get these issues
resolved myself. I _have_ managed to fix the specific issue I mentioned
above, but there are still several incomplete cursor traversals I am
seeing in libclang.

Folks,

After pulling the latest master and running some more tests, a number of
issues I was seeing are now fixed. My two patches are still needed, so
I'd like to get those in. Otherwise, things are looking pretty good on
my end.

Cheers,
Jeaye

Hi Jeaye, please send patches to cfe-commits or use Phabricator. CC-ing someone who knows the code is highly recommended. Also consider providing tests for bugs you’ve fixed as it’s likely to be raised during official review.