Notgnoshi / includegraph

Generate preprocessor #include dependency graphs from a Clang compilation database
MIT License
3 stars 0 forks source link

Add optional libclang implementation #16

Open Notgnoshi opened 2 years ago

Notgnoshi commented 2 years ago

includegraph.py is trivial to implement, if you give up some requirements:

Notgnoshi commented 2 years ago

Or perhaps just use cpp -H?

$ cpp -H -I/home/nots/Documents/includegraph/examples/example3/include -I/home/nots/Documents/includegraph/examples/example3/src /home/nots/Documents/includegraph/examples/example3/src/example3.cpp -o /dev/null
. /home/nots/Documents/includegraph/examples/example3/include/example3/foo.h
. /home/nots/Documents/includegraph/examples/example3/include/example3/bar.h
. /home/nots/Documents/includegraph/examples/example3/src/private.h
.. /home/nots/Documents/includegraph/examples/example3/src/circular.h
... /home/nots/Documents/includegraph/examples/example3/src/private.h

... this can detect circular includes, so there's no actual reason to parse the linemarkers...