[cfe-dev] clang-format leading whitespace

Manuel Klimek via cfe-dev cfe-dev at lists.llvm.org
Mon Nov 13 05:14:50 PST 2017


On Sat, Nov 11, 2017 at 7:20 AM Samuel Williams via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> I am interested in contributing to clang-format, to add an option to
> preserve and correct leading indentation.
>
> Right now if you write code such as:
>
> {
> ....int x = 10;
> ....
> ....return x;
> }
>
> The line in the middle will be truncated and there is no option to control
> it.
>
> Some code prefers to have indented leading whitespace, indented to the
> same level as the previous line.
>
> Would such a contribution be accepted and is anyone willing to help me
> through the process where necessary?
>

The current reasoning is that with an automated formatter the indented
leading whitespace doesn't help any more.


>
> Thanks
> Samuel
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171113/fe1b3ce1/attachment.html>


More information about the cfe-dev mailing list