<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58138>58138</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Libclang: unclear if visitChildren can be used to visit included entities
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ajrouvoet
      </td>
    </tr>
</table>

<pre>
    Given a file:

```
#include <stdio.h>

void f() {}
```

Visiting the children of the translation unit after parsing this with `clang_parseTranslationUnit2` will not visit the declarations in `stdio.h`.

As a user of libclang, I would expect there to be some way to instruct `clang_visitChildren` to also visit the included entities. But I cannot find any method that accomplishes this (neither in the docs, nor in the Index.h commentary). I'm not fluent enough in C++ to find out by inspecting the sources for libclang. Does libclang have some way to visit included entities?

Perhaps the docs could be improved to clarify either way.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9k01v2zAMhn-NfCFmuLbjj4MPbbIOBXbYYdt1kC06ViFLgT6S5t-PUpIuxYYBhhNKIt-HL-XRiPPwRR5RA4dZKmTVIyt2rLi9m-L6XMKyknpSQSCwauu8kCZfWPX5PuVopICZlR0re2DtE2t3_66V3j-lk17qPfgFYVqkEpZYzJxib7l2intpNAQtPfDZo4UDt-6SIh2cpF-Aik6K6_2vuIXf_6T9oKySdumYUqCNh2MUTNUFUo5NxxxIHYvcOmqK_B7y0ZE7wZE0gSk5Ji1WbuEFTiYoAfh2wClVtURtYERwZkU48XMMpXbeBjrwzpkottd2Ix-d4sqZO7yr0VRce7IIXQ5PwZPkxHVsZJZaANdnWNEvRlAOJ4OmyawHJd2C7uIPDUKjjGSxx9S3mVyE1-Z96UULfMsXoOSV5Lg90_ByeGFluybXZhVonVBM2C8xa8vKJ3oidwIxhDaeY6fRidtAnQl2IpKZpG6-5bAztHQLYeHHj25dLPirfVY938_kG9qFH9x7R8QeJ0HOy_VgzZEyqVacsJzPcHWAFPIMh4emqbu2KdouE0Ml-qrnGYkoHL7ehls90o2bFHLyaIYP44oDiDp0IcR_eLNg1bB4f3Dxmyqf6dkTRRhzcpkCpY63n08E_Eq2USidC9Rr-bzpHqouW4auHXsUcy-aiTf9ONd1X1VNy7EeKxz7MVN8ROUGtqF5lBpPkErQf7bZZXIoi7J8KIq66Ku66vK2483Ud5u5nSaBbcnqAlcuVR45cmP3mR0S0hj2jjbpKnn3Z5M7J_caMclRfR7o7tmBv1oTjgZ9lsSHBP8bq-dzWQ">