clang-format: Allow unbroken ::: in inline assembly

Eugene Toder eltoder at gmail.com
Tue Sep 16 09:42:02 PDT 2014


I don't. Please commit it for me.
On Sep 16, 2014 12:18 PM, "Daniel Jasper" <djasper at google.com> wrote:

> Look good. Do you have commit access or should I commit this for you?
>
> On Tue, Sep 16, 2014 at 5:55 PM, Eugene Toder <eltoder at gmail.com> wrote:
>
>> Makes sense. Moved into unittests.
>>
>>
>> On Tue, Sep 16, 2014 at 11:46 AM, Daniel Jasper <djasper at google.com>
>> wrote:
>>
>>> Thanks. However, tests like these should go in
>>> unittests/Format/FormatTest.cpp. Sorry for not being more precise before.
>>>
>>> On Tue, Sep 16, 2014 at 5:41 PM, Eugene Toder <eltoder at gmail.com> wrote:
>>>
>>>> Thank you. Now with a test.
>>>>
>>>> Eugene
>>>>
>>>>
>>>> On Mon, Sep 15, 2014 at 6:10 PM, Daniel Jasper <djasper at google.com>
>>>> wrote:
>>>>
>>>>> I think the change itself look good (although I don't use inline
>>>>> assembly much). Please add a test.
>>>>>
>>>>> On Mon, Sep 15, 2014 at 11:14 PM, Eugene Toder <eltoder at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> When inline assembly has only clobber constraints it's common to
>>>>>> write all three colons without spaces, for example:
>>>>>>
>>>>>> asm volatile("nop" ::: "memory");
>>>>>>
>>>>>> Currently clang-format splits ::: into coloncolon and colon, and
>>>>>> inserts a space before the colon, which looks strange:
>>>>>>
>>>>>> asm volatile("nop" :: : "memory");
>>>>>>
>>>>>> I suggest to allow having ::: without spaces in this case. Attached
>>>>>> is a simple patch to that effect.
>>>>>>
>>>>>> Thanks,
>>>>>> Eugene
>>>>>>
>>>>>> _______________________________________________
>>>>>> cfe-commits mailing list
>>>>>> cfe-commits at cs.uiuc.edu
>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140916/a240bfd5/attachment.html>


More information about the cfe-commits mailing list