Skip to content

Commit

Permalink
[libc++][test] Add default member initializers to TestCaseMapSet
Browse files Browse the repository at this point in the history
These do-nothing initializers (`Buffer<T>` is fully initialized, so value-init and default-init are equivalent) silence Clang 18 `-Wmissing-field-initializers` warnings when the functions in the same header use designated initializers for `TestCaseMapSet`. (Clang 19+ doesn't emit this warning for designated initializers.)
  • Loading branch information
CaseyCarter committed Sep 3, 2024
1 parent 451a313 commit 312ac22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libcxx/test/std/containers/insert_range_maps_sets.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ constexpr bool test_map_constraints_insert_range() {

template <class T>
struct TestCaseMapSet {
Buffer<T> initial;
Buffer<T> input;
Buffer<T> expected;
Buffer<T> expected_multi;
Buffer<T> initial{};
Buffer<T> input{};
Buffer<T> expected{};
Buffer<T> expected_multi{};
};

// Empty container.
Expand Down

0 comments on commit 312ac22

Please sign in to comment.