On Tue, Mar 24, 2015 at 5:20 PM, Richard <[email protected]> wrote:

> In http://reviews.llvm.org/D8532#145854, @djasper wrote:
>
> > 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.
>
>
> This is my view on readability as well and one of the reasons I wrote this
> check for `clang-tidy`.
>
> These patches arose from me trying out the new check on a "real codebase"
> instead of my single lint based test file.  A couple of issues arose from
> applying the new check on the code that is helping me to improve my check
> beyond just handling the basics, so this is all great feedback for me, even
> if the patches don't get accepted.
>
> The LLVM coding rule of "no `else` after a `return`, `continue`, etc."
> probably should be turned into a clang-tidy check, at least for detection
> if not correction.
>

I have committed an initial version of such a check in r226025.


> 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

Reply via email to