<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 5, 2018, 9:27 PM Chris Lattner via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Dec 4, 2018, at 10:59 AM, George Burgess IV <<a href="mailto:george.burgess.iv@gmail.com" target="_blank">george.burgess.iv@gmail.com</a>> wrote:<br>
> <br>
> > I think people are too eager to use `auto` because it is easy to write but it makes the types substantially harder for the reader to understand<br>
> <br>
> I'm probably the Nth person to ask this, but what keeps us from promoting the use of a clang-tidy-powered tool that basically emits fixits of s/auto/actual_type/?<br></blockquote></div><div><br></div><div>For me: I still don't know how to integrate clang-tidy into my development workflow. I'm open to pointers to documentation/etc.</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Because the tool would need to apply judgement to when this makes sense.  If we can’t write an algorithm in coding standards.html to be prescriptive about when to use auto, then I don’t think we can automate this.<br></blockquote></div><div><br></div><div>Yeah, I don't think we can automate it entirely, but at least it might lower the writing cost to make it easier for folks favoring auto for writability where community standards would prefer the named type. Nice thing about clang-tidy etc is if integrated well, it should only flag on code in the current diff, and only as a suppressible suggestion not a hard requirement.</div><div><br></div><div>I think if folks want to work on that, it'd be appreciated, but I don't think it changes the discussion around what style we want.</div><div><br></div><div><br></div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-Chris<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>