[cfe-users] Incomplete cursor traversal in libclang

Jeaye contact at jeaye.com
Sat Nov 8 14:32:48 PST 2014


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:

```c++
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):

https://gist.github.com/jeaye/243d8b992f799de6ecf0

Cheers,
Jeaye



More information about the cfe-users mailing list