From 312ac2252d27e1bf837622f84839069f90f1dee0 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Tue, 3 Sep 2024 11:23:23 -0700 Subject: [PATCH] [libc++][test] Add default member initializers to `TestCaseMapSet` These do-nothing initializers (`Buffer` 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.) --- libcxx/test/std/containers/insert_range_maps_sets.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libcxx/test/std/containers/insert_range_maps_sets.h b/libcxx/test/std/containers/insert_range_maps_sets.h index 82fea93b68fe37..78af8ac66aacc8 100644 --- a/libcxx/test/std/containers/insert_range_maps_sets.h +++ b/libcxx/test/std/containers/insert_range_maps_sets.h @@ -70,10 +70,10 @@ constexpr bool test_map_constraints_insert_range() { template struct TestCaseMapSet { - Buffer initial; - Buffer input; - Buffer expected; - Buffer expected_multi; + Buffer initial{}; + Buffer input{}; + Buffer expected{}; + Buffer expected_multi{}; }; // Empty container.