Description
While clang-include-cleaner works fine for me in most cases, some C++-hostile projects (like ffmpeg) require their headers to be wrapped with extern "C"
to avoid C++ name mangling. When I run clang-include-cleaner on projects that use such headers, I have to manually wrap them with extern "C"
afterward. It would be helpful if clang-include-cleaner could handle this automatically.
For example, adding an option like --wrap-extern-c
would allow clang-include-cleaner to wrap specified headers, and it could be used like this:
$ /path/to/bin/clang-include-cleaner -p cmake-build-debug --edit --wrap-extern-c=libavcodec,libavformat,libavutil ...
This option would wrap all headers from libavcodec
, libavformat
, and libavutil
with extern "C"
.
Thanks for reading!