[cfe-dev] [llvm-dev] RFC: Modernizing our use of auto

Chris Lattner via cfe-dev cfe-dev at lists.llvm.org
Wed Dec 5 21:26:54 PST 2018

> On Dec 4, 2018, at 10:59 AM, George Burgess IV <george.burgess.iv at gmail.com> wrote:
> > 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
> 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/?

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.


More information about the cfe-dev mailing list