I don't feel strongly about this, and I can see some of your reasoning. However, an "if (a) return true; else return false;" is very suspect to me and I think "return a;" is more readable, independent of whether it is at the end of a chain or not.
However, there is an underlying issue here. The existing code is violating LLVM's coding standard of "don't use else after return" ( http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return). So in these chains, all of the "else"s should be removed. On Tue, Mar 24, 2015 at 7:17 AM, Richard <[email protected]> wrote: > Thanks for your ideas, John, I'm going to incorporate this into the > `clang-tidy` check. > > > http://reviews.llvm.org/D8532 > > EMAIL PREFERENCES > http://reviews.llvm.org/settings/panel/emailpreferences/ > > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
