[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 02:28:01 PDT 2019


On Fri, 2019-10-25 at 20:59 -0300, Alberto Lagos wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
> 
> Hi Keneth!,
> 
> Did you try clang::PPCallbacks or clang::PreprocessorFrontEndAction?  
> 
> Probably PPCallbacks is what you are looking for. 
> 
Would it be possible to get the location for the header includes from
the source manager? E.g. SourceManager::getLocForStartOfFile gives me
the beginning of the file. But how can I get the location for the
header files via SM?

> Let me know if that help!
> 
> Regards. 
> 
> On Fri, 25 Oct 2019 at 16:13 Kenth Eriksson via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> > Hi!
> > 
> > I'm refactoring some code with libtooling, replacing one API call with a new another one. This requires me to insert a new header file. How can this be done? 
> > 
> > Thanks,
> > Kenth
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> > 



More information about the cfe-dev mailing list