oleg.smolsky marked 3 inline comments as done. oleg.smolsky added a comment.
In D131985#3727568 <https://reviews.llvm.org/D131985#3727568>, @Eugene.Zelenko wrote: > In D131985#3727544 <https://reviews.llvm.org/D131985#3727544>, @oleg.smolsky > wrote: > >> In D131985#3727436 <https://reviews.llvm.org/D131985#3727436>, @njames93 >> wrote: >> >>> The idea of this check is good, but restricting it to only return >>> statements seems baffling. A general check that could remove useless parens >>> would have a lot more value. >> >> Of course a more general check would be more generally useful. Yet that >> requires a lot more code as handling many more contexts in involved in C++. >> >> Basically this change addresses a concrete, somewhat wide-spread silly habit >> that exists in the wild. > > I recently observed in the wild patterns like: > > std::vector<std::string> data; > > for (std::vector<std::string>::iterator it = data.begin(); it != > data.end(); ++it) > std::cout << (*it) << std::endl; While I have not seen that one, I've seen something similar, with even more involved syntax: for (auto it = data.begin(); it != data.end(); ++it) std::cout << (*it).something << std::endl; people write wild syntax... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131985/new/ https://reviews.llvm.org/D131985 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits