[cfe-dev] system file dependencies for a part of the code using libtooling

Manuel Klimek klimek at google.com
Fri Jan 30 01:17:56 PST 2015


You can take a look at include-what-you-use.
https://code.google.com/p/include-what-you-use/

Note that it has problems; we hope to get a better solution when we have
modules.

On Fri Jan 30 2015 at 12:21:42 AM Deepak Rajendrakumaran <deepak3 at vt.edu>
wrote:

> Hello,
>
> I have been trying to find the system file dependencies for a part of the
> code within a single c file. A sample scenario will be-
>
> -There are 3 functions in file f1.c- func1(), func2() and func3()
> -the file f1.c had a number of system header files included
> -I use clang to take func2() from f1.c and move it to a new file f2.c
> -To do this I need  to understand which all system headers present in f1.c
> are being used by func2() so that I can add these also to f2.c
>
>
> I have looked at all functions which I could use from the clang API and I
> cannot see any way I can get this information. Does anyone know of any
> functionality which will help achieve this??
>
>
> Regards,
> Deepak
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150130/41562fe2/attachment.html>


More information about the cfe-dev mailing list