[PATCH] D53372: [clang-tidy] Resolve readability-else-after-return false positive for constexpr if.

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 18 02:24:27 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D53372#1268207, @curdeius wrote:

> In https://reviews.llvm.org/D53372#1267728, @lebedev.ri wrote:
>
> > I think it would be good to add some more explanation as to *why* that `else` has to be kept.
>
>
> Do you mean add a comment in the code or just an explanation for the review?
>  In this case removing else will just provoke a compilation error. There may be some cases where you may remove else though.


I was indeed talking about the review, thank you.

In https://reviews.llvm.org/D53372#1268208, @curdeius wrote:

> Actually, I can make it an option for this check to skip or not constexpr ifs, WDYT?


I'm not sure, maybe this shouldn't be an option.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53372





More information about the cfe-commits mailing list