[libc-commits] [libc] [libc] fix -Wmissing-braces (PR #77345)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Jan 8 09:38:13 PST 2024


nickdesaulniers 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};
+  }
```
?

https://github.com/llvm/llvm-project/pull/77345


More information about the libc-commits mailing list