<html>
<head></head>
<body>
<p>Hi,</p>
<p>Some C++ programs include headers which are not in the same directory as the file being processed. In some cases, it is used a path relative to the file, for instance "directory/file.h". And in some other cases, the headers are included in a way understandable to the build system of the program, even using angled headers "<name/file.h> and that path is not relative to its location. </p>
<p>The problem for me is that I don't know how can I indicate in my tool the exact location of headers which are not in the same directory when creating the AST. </p>
<p>I'm using something like this to parse the code:</p>
<p> ...<br/>
 ClangTool Tool(OptionsParser.getCompilations(), file); <br /> Tool.run(newFrontendActionFactory(&mytool));<br /> ...<br/>
<br /> so I would need to tell the object "Tool" to find also in other directories, for instance, a mapping of the headers included and their directory. Or is there a simple way to do this that I'm overlooking?</p>
<p>Thanks,</p>
<p>Pedro.</p>

</body>
</html>