echristo added a comment. In https://reviews.llvm.org/D27872#636147, @timshen wrote:
> In https://reviews.llvm.org/D27872#636130, @echristo wrote: > > > 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. > > > I'm happy to discuss on a style guide <del>bikeshedding</del>change, since > you are the second person that raises this concern, and now it's like 2 vs 2 > :). > > Another reason to not to do so is consistency with other returning functions, > and potential changes required in the future, when a void-returning function > starts to return values. I'm pretty sure I've never seen return <void type function> widely used in the code base versus my suggestion. That said, if you've looked and it's roughly 50/50 then I care a lot less (and we can bike shed in some separate thread). -eric https://reviews.llvm.org/D27872 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits