<div dir="ltr">Hi Paul,<div><br></div><div>Thank you for the information! I will remember to do that from now on.</div><div><br></div><div>Regards,</div><div><br></div><div>Owen</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 12, 2019 at 11:34 AM <<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Owen,<br>
<br>
FYI, putting a URL in the headline of the commit message takes up<br>
space and doesn't really describe the fix to a casual reader. The<br>
subject line of your Phabricator review looks like it would have<br>
been perfectly fine to use for the commit as well.<br>
<br>
Citing the bug in the body of the commit message is enough to let<br>
people track down the original report, although even there we usually <br>
abbreviate it to 'PRnnnn' (so PR41413 in this example).<br>
<br>
Thanks!<br>
--paulr<br>
<br>
> -----Original Message-----<br>
> From: cfe-commits [mailto:<a href="mailto:cfe-commits-bounces@lists.llvm.org" target="_blank">cfe-commits-bounces@lists.llvm.org</a>] On Behalf Of<br>
> Owen Pan via cfe-commits<br>
> Sent: Sunday, April 07, 2019 5:06 PM<br>
> To: <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
> Subject: r357877 - [clang-format] Fix bug<br>
> <a href="https://bugs.llvm.org/show_bug.cgi?id=41413" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=41413</a><br>
> <br>
> Author: owenpan<br>
> Date: Sun Apr 7 14:05:52 2019<br>
> New Revision: 357877<br>
> <br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=357877&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=357877&view=rev</a><br>
> Log:<br>
> [clang-format] Fix bug <a href="https://bugs.llvm.org/show_bug.cgi?id=41413" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=41413</a><br>
> <br>
> Differential Revision: <a href="https://reviews.llvm.org/D60374" rel="noreferrer" target="_blank">https://reviews.llvm.org/D60374</a><br>
> <br>
> Modified:<br>
> cfe/trunk/lib/Format/ContinuationIndenter.cpp<br>
> cfe/trunk/unittests/Format/FormatTest.cpp<br>
> <br>
> Modified: cfe/trunk/lib/Format/ContinuationIndenter.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> project/cfe/trunk/lib/Format/ContinuationIndenter.cpp?rev=357877&r1=357876<br>
> &r2=357877&view=diff<br>
> ==========================================================================<br>
> ====<br>
> --- cfe/trunk/lib/Format/ContinuationIndenter.cpp (original)<br>
> +++ cfe/trunk/lib/Format/ContinuationIndenter.cpp Sun Apr 7 14:05:52 2019<br>
> @@ -945,18 +945,24 @@ unsigned ContinuationIndenter::getNewLin<br>
> return State.Stack[State.Stack.size() - 2].LastSpace;<br>
> return State.FirstIndent;<br>
> }<br>
> - // Indent a closing parenthesis at the previous level if followed by a<br>
> semi or<br>
> - // opening brace. This allows indentations such as:<br>
> + // Indent a closing parenthesis at the previous level if followed by a<br>
> semi,<br>
> + // const, or opening brace. This allows indentations such as:<br>
> // foo(<br>
> // a,<br>
> // );<br>
> + // int Foo::getter(<br>
> + // //<br>
> + // ) const {<br>
> + // return foo;<br>
> + // }<br>
> // function foo(<br>
> // a,<br>
> // ) {<br>
> // code(); //<br>
> // }<br>
> if (Current.is(tok::r_paren) && State.Stack.size() > 1 &&<br>
> - (!Current.Next || Current.Next->isOneOf(tok::semi, tok::l_brace)))<br>
> + (!Current.Next ||<br>
> + Current.Next->isOneOf(tok::semi, tok::kw_const, tok::l_brace)))<br>
> return State.Stack[State.Stack.size() - 2].LastSpace;<br>
> if (NextNonComment->is(TT_TemplateString) && NextNonComment-<br>
> >closesScope())<br>
> return State.Stack[State.Stack.size() - 2].LastSpace;<br>
> <br>
> Modified: cfe/trunk/unittests/Format/FormatTest.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=357877&r1=357876&r2=<br>
> 357877&view=diff<br>
> ==========================================================================<br>
> ====<br>
> --- cfe/trunk/unittests/Format/FormatTest.cpp (original)<br>
> +++ cfe/trunk/unittests/Format/FormatTest.cpp Sun Apr 7 14:05:52 2019<br>
> @@ -12822,6 +12822,24 @@ TEST_F(FormatTest, ConfigurableContinuat<br>
> format("int i = longFunction(arg);", SixIndent));<br>
> }<br>
> <br>
> +TEST_F(FormatTest, WrappedClosingParenthesisIndent) {<br>
> + FormatStyle Style = getLLVMStyle();<br>
> + verifyFormat(<br>
> + "int Foo::getter(\n"<br>
> + " //\n"<br>
> + ") const {\n"<br>
> + " return foo;\n"<br>
> + "}",<br>
> + Style);<br>
> + verifyFormat(<br>
> + "void Foo::setter(\n"<br>
> + " //\n"<br>
> + ") {\n"<br>
> + " foo = 1;\n"<br>
> + "}",<br>
> + Style);<br>
> +}<br>
> +<br>
> TEST_F(FormatTest, SpacesInAngles) {<br>
> FormatStyle Spaces = getLLVMStyle();<br>
> Spaces.SpacesInAngles = true;<br>
> <br>
> <br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>