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

Chris Lattner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 14:56:30 PDT 2020


lattner added a comment.

I'm not sure what the contention here is.  `int` is a clearly inferior choice and is just as unprincipled as `unsigned` is, we should use the correct type.

I get the sense that you're arguing for `ssize_t` or one of its analogues instead of `size_t`? Are you arguing for general principles or this specific case?  In this specific case, using `size_t` seems completely reasonable, but I agree that `ssize_t` would also be fine.

I'm ok with either size_t or ssize_t here, but if you want to turn this into a general principle that we apply to the code base, then it should be discussed on llvm-dev first.


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