Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Include statements

On 14-02-18 10:06 AM, Hadrien Bertrand wrote:

> I can check the include in the local file with :
> 
> for(IASTPreprocessorIncludeStatement inc : ast.getIncludeDirectives()) {
>     ....
> } 
> 
> However, if the header I'm looking for is in one of the header included in
> the source file, I cannot detect it. Basically, I'd like to check "in depth"
> for the header file.

It looks like ast is an instance of IASTranslationUnit?  If so, then I think you can use:

   ast.getIndexFileSet().contains(IIndexFile)

-Andrew



Back to the top