Add clang-format for libstdc++

Jonathan Wakely jwakely@redhat.com
Tue Feb 7 21:17:49 GMT 2023


On Tue, 7 Feb 2023 at 20:39, Dimitrij Mijoski via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> Is there interest to add a clang-format file for libstdc++?
>
> The basic idea is to take the existing clang format located at contrib/clang-format,
> copy it to contrib/clang-format-libstdc++, and modify it according to libstdc++ rules
> https://gcc.gnu.org/onlinedocs/libstdc++/manual/source_code_style.html .
> Similarly to the first clang-format, it will be optional and it will be enabled if the developer
> calls the command:
>
> make clang-format
>
> inside the build tree. That will create the symbolic link srcdir/libstdc++-v3/.clang-format .
> Alternatively, it can be put directly where it is required without the need for the invocation
> of make.

If you want to do the work and contribute it, please go ahead. But
last time somebody looked into it, clang-format doesn't support our
code style conventions. There was something in our template
indentation that clang-format doesn't support, and can't be configured
to support.



More information about the Libstdc++ mailing list