[libc-commits] [libc] [libc] fix -Wmissing-braces (PR #77345)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Jan 8 09:39:29 PST 2024
jhuber6 wrote:
> > Could we construct these explicitly? It's difficult to see what it's supposed to be doing with the brace initialization.
>
> as in
>
> ```diff
> diff --git a/libc/src/__support/HashTable/table.h b/libc/src/__support/HashTable/table.h
> index 9b2f3beea996..61670a5db0e3 100644
> --- a/libc/src/__support/HashTable/table.h
> +++ b/libc/src/__support/HashTable/table.h
> @@ -333,7 +333,9 @@ public:
> return {0, full_capacity() - available_slots,
> Group::load_aligned(&control(0)).occupied(), *this};
> }
> - iterator end() const { return {0, 0, {{0}}, *this}; }
> + iterator end() const {
> + return {0, 0, IteratableBitMask{{0}}, *this};
> + }
> ```
>
> ?
I meant the iterator type, but yeah. It's just a little confusing to see so many brace initializers in one place, hence the warning.
https://github.com/llvm/llvm-project/pull/77345
More information about the libc-commits
mailing list