CXCursor_InclusionDirective semantics

What is the exact semantic of CXCursor_InclusionDirective ? I'm trying to use it to detect inclusion directives found in a translation unit.
However, I'm only seeing the ones from the toplevel source file that is being parsed.

Why aren't inclusion directive being reported transitively ? Is this a feature or a bug ?


Perhaps it's a bug, or you're doing some kind of filtering? If I run c-index-test -test-load-source all <some file including stdlib.h>, I see CXCursor_InclusionDirective cursors for the transitive inclusion of everything that <stdlib.h> includes.

  - Doug