<div dir="ltr"><div dir="ltr">Generally, if clang-tidy feedback is correct/actionable I think it's fine - if it's muddying up the review, then asking the author to address the clang-tidy feedback first, before you review the rest seems like a good approach to me.<br><br>On Mon, Apr 19, 2021 at 9:31 AM Chris Tetreault via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="gmail-m_-190881587856280578WordSection1">
<p class="MsoNormal">I agree that the clang-tidy reporting on your linked patch is quite egregious. I think that clang-tidy should only post feedback out of line. Ideally, it should only complain about actual violations of the llvm coding standards. I see nothing
 in the coding standards about requiring or preferring that stack locals being declared const if they can be.</p></div></div></blockquote><div><br>If that were the policy, I'd object to it (top level const certainly isn't done pervasively in LLVM and I'd find it "quirky" (& I do push back on it where it's not already in use as a micro-convention in some file/area of the code)), but the policy clang-tidy seems to be enforcing is to use "const" on "auto&" and "auto*" where possible, which while not quite written in the LLVM style guide, I think has been discussed/generally encouraged in review - the style guide sort of alludes to it in the example here: <a href="https://llvm.org/docs/CodingStandards.html#beware-unnecessary-copies-with-auto">https://llvm.org/docs/CodingStandards.html#beware-unnecessary-copies-with-auto</a> <br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_-190881587856280578WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">                Christopher Tetreault<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>> <b>On Behalf Of
</b>Maxim Kazantsev via llvm-dev<br>
<b>Sent:</b> Monday, April 19, 2021 2:43 AM<br>
<b>To:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<b>Subject:</b> [EXT] [llvm-dev] clang-tidy makes review a pain<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hello everyone,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I started noticing that lately we’ve improved reporting from clang-tidy, pointing out at various formatting issues. However the more verbose it becomes, the more annoyed I feel about it. For example here:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><a href="https://reviews.llvm.org/D100721" target="_blank">https://reviews.llvm.org/D100721</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">It complains literally about every second line, inserting its comments straight into review. They take as much space as the actual code. Maybe it’s just me, but it’s really hard to me to understand what the patch is actually doing with
 so many inlined auto-generated comments. Maybe there is a button to hide them somewhere, but I failed to find it.<span lang="RU"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I understand what was the intention, and clang-tidy is a cool thing in general, but it’s getting too intrusive. Does anyone else have the same problem as I do? If there’s a lot of people whom it annoys, maybe we should think how to make
 it less invasive. Maybe it should put these comment when the patch gets approved, or something like this.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Max<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>