[cfe-dev] Add additional #include header file as a result of a refactor

Kenth Eriksson via cfe-dev cfe-dev at lists.llvm.org
Mon Oct 28 07:58:29 PDT 2019


On Mon, 2019-10-28 at 07:47 -0300, Alberto Lagos wrote:
> Like Diana said, overriding InclusionDirective will help you getting the include that you want to replace. That method will give you everything you need (location, name, if is an angled include, etc). Since is called in when it finds an include one you TU. 
> 
> https://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html#ad5509ca394c21faaead91ec8add75dd2
> 
>  Take a look to the details of the InclusionDirective. 
> 

Thanks, I'm now able to get all the included files after implementing
InclusionDirective in PPCallbacks.





More information about the cfe-dev mailing list