Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional libclang implementation #16

Open
Notgnoshi opened this issue Jun 30, 2022 · 1 comment
Open

Add optional libclang implementation #16

Notgnoshi opened this issue Jun 30, 2022 · 1 comment

Comments

@Notgnoshi
Copy link
Owner

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

  • standard library only dependencies
  • detect circular dependencies
    • related: generate the graph that the source code defines, not the graph that was actually followed by the preprocessor (because of header guards)
@Notgnoshi
Copy link
Owner Author

Notgnoshi commented Jul 23, 2022

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant