[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 15:17:44 PST 2017
echristo added a comment.
In https://reviews.llvm.org/D27872#628212, @timshen wrote:
> I changed type style to early return.
>
> For constructors and destructors, I use:
>
> if (...) {
> // statement;
> return;
> }
>
>
> For normal functions that returns void, I chose:
>
> if (...)
> return Foo();
> llvm_unreachable(...);
>
> since it's more compact. If returning void looks weird, we should add it to the style guide.
Looks pretty weird. Typically I'd suggest just:
if (foo) {
Foo();
return;
}
since that will keep cognitive overhead to a minimum.
-eric
> Other functions are not controversial.
https://reviews.llvm.org/D27872
More information about the llvm-commits
mailing list