More experiments with libclang
Tags: programming, howtos, projects
In late 2015, I started fiddling with libclang
in order to analyse
abstract syntax trees. After multiple queries reached me via e-mail,
I decided to create a public repository of my experiments.
The repository is called
libclang-experiments
and resides on my
GitHub account. It contains the code for the first blog post about libclang
, which presented some
basic routines for walking an abstract syntax tree, as
well as code for the second blog post, which dealt with counting the extents of
a function.
Note that since libclang
is somewhat fiddly to use, the repository also provides a CMake
module
for actually finding the library on your computer. Please refer to the
CMakeLists.txt
of the repository for usage information—and do not hesitate to contact me, either via e-mail
or by opening an issue on GitHub if
you have any questions.