<div dir="ltr">Oh, I thought NextToken is the comment token... Now I'm thoroughly confused.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 19, 2014 at 6:59 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">On Mon, May 19, 2014 at 6:57 PM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><div>On Mon, May 19, 2014 at 6:55 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><div>On Mon, May 19, 2014 at 6:54 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><div>On Mon, May 19, 2014 at 6:53 PM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><div>On Mon, May 19, 2014 at 6:29 PM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">lg<br>
<br>
================<br>
Comment at: clang-tidy/llvm/NamespaceCommentCheck.cpp:66<br>
@@ +65,3 @@<br>
+ Token Tok;<br>
+ while (Lexer::getRawToken(Loc, Tok, Sources, Result.Context->getLangOpts())) {<br>
+ Loc = Loc.getLocWithOffset(1);<br>
----------------<br>
Can you add a comment explaining why it's ok to retry on failure with an incremented location?<br>
<br>
================<br>
Comment at: clang-tidy/llvm/NamespaceCommentCheck.cpp:73<br>
@@ +72,3 @@<br>
+ bool NextTokenIsOnSameLine = Sources.getSpellingLineNumber(Loc) == EndLine;<br>
+ bool NeedLineBreak = NextTokenIsOnSameLine && Tok.isNot(tok::eof);<br>
+<br>
----------------<br>
Can you explain why we need this? (I'd have expected the fix-it to not change the number of newlines, thus just inserting the comment between the } and the newline).<br></blockquote><div><br></div></div></div><div>Am I missing where you added a comment for this?</div>
</div></div></div></blockquote><div><br></div></div></div><div>Should be here: <a href="http://reviews.llvm.org/D3825?vs=9577&id=9579&whitespace=ignore-all#toc" target="_blank">http://reviews.llvm.org/D3825?vs=9577&id=9579&whitespace=ignore-all#toc</a> </div>
</div></div></div></blockquote><div><br></div></div></div><div>Ah, sorry, there's no comment for this. I've answered your question on the Phab only.</div><div>Should I add a comment?</div></div></div></div></blockquote>
<div><br></div></div></div><div>Yes, please :) Thx!</div></div></div></div></blockquote><div><br></div></div></div><div><div><br>Looking at this once again, I see that a comment would be tautological:</div><div> // We need a line break when the next token is on the same line.</div>
<div class="">
<div> bool NeedLineBreak = NextTokenIsOnSameLine && Tok.isNot(tok::eof);</div></div></div><div><br></div><div>Are you sure it will make anything clearer?</div><div><br></div></div>
</div></div>
</blockquote></div><br></div>