Issue 110225
Summary [clang-include-cleaner][Feature Request] Add an option to wrap extern "C" for certain headers
Labels new issue
Assignees
Reporter bc-lee
    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!

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to