[cfe-dev] clang-format leading whitespace

Daniel Jasper via cfe-dev cfe-dev at lists.llvm.org
Mon Nov 13 05:19:14 PST 2017


Generally, see here:
https://clang.llvm.org/docs/ClangFormatStyleOptions.html#
adding-additional-style-options

I vaguely remember this question being brought up before and I think we
decided against it.

On Mon, Nov 13, 2017 at 2:14 PM, Manuel Klimek via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> 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
>>
>
> _______________________________________________
> 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/841011e5/attachment.html>


More information about the cfe-dev mailing list