<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-05-22 11:19 GMT-07:00 Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
> On 2015 May 21, at 18:22, Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>> wrote:<br>
><br>
> Alex L <<a href="mailto:arphaman@gmail.com">arphaman@gmail.com</a>> writes:<br>
>> 2015-05-21 15:42 GMT-07:00 Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>>:<br>
>>> On 2015 May 21, at 15:14, Alex Lorenz <<a href="mailto:arphaman@gmail.com">arphaman@gmail.com</a>> wrote:<br>
>>>> -  // Parse the block scalar manually so that we can return unique pointer<br>
>>>> -  // without having to go trough YAML traits.<br>
>>>> -  if (In.setCurrentDocument()) {<br>
>>>> +std::unique_ptr<Module> MIRParserImpl::parse(SMDiagnostic &Error) {<br>
>>>> +  yaml::Input In(SM.getMemoryBuffer(SM.getMainFileID())->getBuffer(),<br>
>>>> +                 /*Ctxt=*/nullptr, handleYAMLDiag, &Error);<br>
>>><br>
>>> Can you clang-format this?  The comment right against the `nullptr` is<br>
>>> awkward.<br>
>><br>
>> Clang-format leaves it likes this, should I add a space between the comment<br>
>> and nullptr?<br>
><br>
> clang-format leaves comments-in-argument-lists like this alone - I guess<br>
> it doesn't have an opinion. FWIW, the predominate style in the llvm repo<br>
> is like Alex wrote it here, which no space:<br>
><br>
> llvm % git grep '/\* \?[A-Za-z]\+= \?\*/ \?' | wc -l<br>
>     722<br>
> llvm % git grep '/\* \?[A-Za-z]\+= \?\*/ ' | wc -l<br>
>      54<br>
> llvm % git grep '/\* \?[A-Za-z]\+= \?\*/[^ ]' | wc -l<br>
>     668<br>
> llvm % git grep '/\*[A-Za-z]\+=\*/[^ ]' | wc -l<br>
>     663<br>
<br>
</div></div>I personally find:<br>
<br>
    /* Ctxt */ nullptr<br>
<br>
the most readable, and it looks like we have the most of those:<br>
--<br>
$ git grep '/\* \?[A-Za-z]\+ \?\*/ \?' | wc -l<br>
     955<br>
--<br>
<br>
LGTM either way.</blockquote><div><br></div><div>Please take another look, since I rebased the patch based on reorganized MIR library.</div><div><br></div><div>Cheers,</div><div>Alex </div></div><br></div></div>