clang-format: Replaced PointerBindsToType with PointerBinding to allow third kind of formatting

roman at himmes.com roman at himmes.com
Wed Oct 9 09:40:28 PDT 2013


Quoting roman at himmes.com:

>
>>> template <>
>>>
>>> +struct  
>>> ScalarEnumerationTraits<clang::format::FormatStyle::PointerBindingKind>  
>>> {
>>>
>>> +  static void enumeration(IO &IO,
>>>
>>> +                           
>>> clang::format::FormatStyle::PointerBindingKind &Value) {
>>>
>>> +    IO.enumCase(Value, "Left",   clang::format::FormatStyle::PB_Left);
>>>
>>> +    IO.enumCase(Value, "Middle", clang::format::FormatStyle::PB_Middle);
>>>
>>> +    IO.enumCase(Value, "Right",  clang::format::FormatStyle::PB_Right);
>>>
>>>
>> While this alignment might seem nice, I don't think it adds a lot of value.
>> I'd rather keep this file clang-format clean.
>
> At first I thought that this alignment is quite exotic, but entering  
> "const std::sting & str" into goole I found that there are a few  
> libraries out there using this alignment.
> Poco for example. So I see only 2 choices to support this style:
> Either have a config option like in this patch, or removing that  
> explicit option and have that Middle style only auto detected.

Sorry I did not get your point. I just realized that there are some  
spaces too much and you were referring to them.

Best Regards,

Roman Himmes







More information about the cfe-commits mailing list