[PATCH] D82594: Clarify a bit the guideline on omitting braces, including more examples (NFC)

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 14:01:15 PDT 2020


mehdi_amini marked 3 inline comments as done.
mehdi_amini added a comment.

In D82594#2134640 <https://reviews.llvm.org/D82594#2134640>, @lattner wrote:

> In D82594#2131999 <https://reviews.llvm.org/D82594#2131999>, @mehdi_amini wrote:
>
> > In D82594#2131989 <https://reviews.llvm.org/D82594#2131989>, @lattner wrote:
> >
> > > `int` is a clearly inferior choice
> >
> >
> > It isn't clear to me, as I mention in my previous comment, I'd be happy to get more educated on this if you have resources you could point me to that would explain your point?
>
>
> I'm sorry I didn't unpack that.  `int` is inferior on standard LP64 machines because it doesn't express anywhere near the range of subscripts required by some large loops / array subscripts.  While it is surely fine in some cases, it is not a 'safe default' that we could advice be used everywhere.


Thanks for clarifying! (and sorry for the delay, too many other things in flight)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82594/new/

https://reviews.llvm.org/D82594





More information about the llvm-commits mailing list