Add missing #includes PiperOrigin-RevId: 971456720 Change-Id: I72136d8c1371869070543e93b0ecb9ab8837187d
diff --git a/absl/container/BUILD.bazel b/absl/container/BUILD.bazel index f9b0c5c..8cd3ef4 100644 --- a/absl/container/BUILD.bazel +++ b/absl/container/BUILD.bazel
@@ -322,6 +322,7 @@ ":flat_hash_set", ":hash_container_defaults", ":hash_generator_testing", + ":hash_policy_testing", ":test_allocator", ":unordered_set_constructor_test", ":unordered_set_lookup_test", @@ -491,6 +492,7 @@ ":flat_hash_map", ":flat_hash_set", ":hash_function_defaults", + "//absl/base:core_headers", "//absl/hash", "//absl/random", "//absl/strings", @@ -868,10 +870,12 @@ deps = [ ":container_memory", ":hash_function_defaults", + ":hashtable_control_bytes", ":raw_hash_set", "//absl/base:raw_logging_internal", "//absl/random", "//absl/strings:str_format", + "//absl/strings:string_view", "@google_benchmark//:benchmark_main", ], ) @@ -1120,6 +1124,7 @@ linkopts = ABSL_DEFAULT_LINKOPTS, tags = ["no_test_loonix"], deps = [ + ":hash_policy_testing", ":unordered_set_constructor_test", ":unordered_set_lookup_test", ":unordered_set_members_test", @@ -1136,6 +1141,7 @@ linkopts = ABSL_DEFAULT_LINKOPTS, tags = ["no_test_loonix"], deps = [ + ":hash_policy_testing", ":unordered_map_constructor_test", ":unordered_map_lookup_test", ":unordered_map_members_test", @@ -1240,6 +1246,7 @@ "//absl/memory", "//absl/random", "//absl/strings", + "//absl/strings:cord", "//absl/types:compare", "@googletest//:gtest", "@googletest//:gtest_main",
diff --git a/absl/container/btree_benchmark.cc b/absl/container/btree_benchmark.cc index 69a8195..97931da 100644 --- a/absl/container/btree_benchmark.cc +++ b/absl/container/btree_benchmark.cc
@@ -15,8 +15,11 @@ #include <stdint.h> #include <algorithm> +#include <array> +#include <cstddef> #include <functional> #include <map> +#include <memory> #include <numeric> #include <random> #include <set> @@ -24,6 +27,7 @@ #include <type_traits> #include <unordered_map> #include <unordered_set> +#include <utility> #include <vector> #include "absl/algorithm/container.h"
diff --git a/absl/container/btree_test.cc b/absl/container/btree_test.cc index 5b76c34..9bcedc5 100644 --- a/absl/container/btree_test.cc +++ b/absl/container/btree_test.cc
@@ -16,6 +16,7 @@ #include <algorithm> #include <array> +#include <cstddef> #include <cstdint> #include <functional> #include <iostream> @@ -25,6 +26,7 @@ #include <memory> #include <numeric> #include <optional> +#include <set> #include <stdexcept> #include <string> #include <type_traits> @@ -44,6 +46,7 @@ #include "absl/hash/hash_testing.h" #include "absl/memory/memory.h" #include "absl/random/random.h" +#include "absl/strings/cord.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h"
diff --git a/absl/container/fixed_array_test.cc b/absl/container/fixed_array_test.cc index 71c6819..e82919e 100644 --- a/absl/container/fixed_array_test.cc +++ b/absl/container/fixed_array_test.cc
@@ -16,6 +16,8 @@ #include <stdio.h> +#include <cassert> +#include <cstdint> #include <cstring> #include <forward_list> #include <iterator>
diff --git a/absl/container/flat_hash_set_test.cc b/absl/container/flat_hash_set_test.cc index 95ead48..c5878aa 100644 --- a/absl/container/flat_hash_set_test.cc +++ b/absl/container/flat_hash_set_test.cc
@@ -28,6 +28,7 @@ #include "absl/container/hash_container_defaults.h" #include "absl/container/internal/container_memory.h" #include "absl/container/internal/hash_generator_testing.h" +#include "absl/container/internal/hash_policy_testing.h" #include "absl/container/internal/test_allocator.h" #include "absl/container/internal/unordered_set_constructor_test.h" #include "absl/container/internal/unordered_set_lookup_test.h"
diff --git a/absl/container/inlined_vector.h b/absl/container/inlined_vector.h index 8dfbf03..549151d 100644 --- a/absl/container/inlined_vector.h +++ b/absl/container/inlined_vector.h
@@ -41,6 +41,7 @@ #include <cstring> #include <initializer_list> #include <iterator> +#include <limits> #include <memory> #include <type_traits> #include <utility>
diff --git a/absl/container/inlined_vector_benchmark.cc b/absl/container/inlined_vector_benchmark.cc index 5a04277..e3f81bb 100644 --- a/absl/container/inlined_vector_benchmark.cc +++ b/absl/container/inlined_vector_benchmark.cc
@@ -13,9 +13,13 @@ // limitations under the License. #include <array> +#include <cstddef> +#include <cstdint> #include <string> +#include <utility> #include <vector> +#include "absl/base/attributes.h" #include "absl/base/internal/raw_logging.h" #include "absl/base/macros.h" #include "absl/container/inlined_vector.h"
diff --git a/absl/container/inlined_vector_test.cc b/absl/container/inlined_vector_test.cc index 73584ed..f4f5c8c 100644 --- a/absl/container/inlined_vector_test.cc +++ b/absl/container/inlined_vector_test.cc
@@ -16,6 +16,7 @@ #include <algorithm> #include <cstddef> +#include <cstdint> #include <forward_list> #include <iterator> #include <list>
diff --git a/absl/container/internal/compressed_tuple.h b/absl/container/internal/compressed_tuple.h index 4d0fb2a..5d7567d 100644 --- a/absl/container/internal/compressed_tuple.h +++ b/absl/container/internal/compressed_tuple.h
@@ -32,6 +32,7 @@ #ifndef ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_ #define ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_ +#include <cstddef> #include <initializer_list> #include <tuple> #include <type_traits>
diff --git a/absl/container/internal/container_memory_test.cc b/absl/container/internal/container_memory_test.cc index 1aa459c..9ed387a 100644 --- a/absl/container/internal/container_memory_test.cc +++ b/absl/container/internal/container_memory_test.cc
@@ -16,7 +16,10 @@ #include <cstddef> #include <cstdint> +#include <cstring> +#include <map> #include <memory> +#include <string> #include <tuple> #include <type_traits> #include <typeindex>
diff --git a/absl/container/internal/hash_function_defaults_test.cc b/absl/container/internal/hash_function_defaults_test.cc index 67c853c..f1c9ccc 100644 --- a/absl/container/internal/hash_function_defaults_test.cc +++ b/absl/container/internal/hash_function_defaults_test.cc
@@ -14,14 +14,19 @@ #include "absl/container/internal/hash_function_defaults.h" +#include <algorithm> #include <cstddef> +#include <cstdint> #include <functional> +#include <memory> #include <string> #include <string_view> #include <type_traits> #include <utility> +#include <vector> #include "gtest/gtest.h" +#include "absl/base/port.h" #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" #include "absl/hash/hash.h"
diff --git a/absl/container/internal/hash_generator_testing.h b/absl/container/internal/hash_generator_testing.h index 79bff7c..72ef356 100644 --- a/absl/container/internal/hash_generator_testing.h +++ b/absl/container/internal/hash_generator_testing.h
@@ -22,6 +22,7 @@ #include <algorithm> #include <cassert> +#include <cstddef> #include <iosfwd> #include <memory> #include <random>
diff --git a/absl/container/internal/hash_policy_testing.h b/absl/container/internal/hash_policy_testing.h index 5eea528..b7cab68 100644 --- a/absl/container/internal/hash_policy_testing.h +++ b/absl/container/internal/hash_policy_testing.h
@@ -22,6 +22,7 @@ #include <limits> #include <memory> #include <ostream> +#include <string> #include <type_traits> #include <utility> #include <vector>
diff --git a/absl/container/internal/hash_policy_testing_test.cc b/absl/container/internal/hash_policy_testing_test.cc index f0b20fe..d932b0f 100644 --- a/absl/container/internal/hash_policy_testing_test.cc +++ b/absl/container/internal/hash_policy_testing_test.cc
@@ -14,6 +14,8 @@ #include "absl/container/internal/hash_policy_testing.h" +#include <utility> + #include "gtest/gtest.h" namespace absl {
diff --git a/absl/container/internal/hashtablez_sampler.h b/absl/container/internal/hashtablez_sampler.h index eff44bf..9e9a47c 100644 --- a/absl/container/internal/hashtablez_sampler.h +++ b/absl/container/internal/hashtablez_sampler.h
@@ -44,6 +44,7 @@ #include <cstdint> #include <functional> #include <memory> +#include <utility> #include <vector> #include "absl/base/attributes.h"
diff --git a/absl/container/internal/hashtablez_sampler_test.cc b/absl/container/internal/hashtablez_sampler_test.cc index ae89c02..0d863a8 100644 --- a/absl/container/internal/hashtablez_sampler_test.cc +++ b/absl/container/internal/hashtablez_sampler_test.cc
@@ -14,6 +14,7 @@ #include "absl/container/internal/hashtablez_sampler.h" +#include <algorithm> #include <atomic> #include <cassert> #include <cstddef>
diff --git a/absl/container/internal/inlined_vector.h b/absl/container/internal/inlined_vector.h index 5b9763e..e9eafdd 100644 --- a/absl/container/internal/inlined_vector.h +++ b/absl/container/internal/inlined_vector.h
@@ -29,6 +29,7 @@ #include "absl/base/config.h" #include "absl/base/internal/hardening.h" #include "absl/base/macros.h" +#include "absl/base/optimization.h" #include "absl/container/internal/compressed_tuple.h" #include "absl/memory/memory.h" #include "absl/meta/type_traits.h"
diff --git a/absl/container/internal/raw_hash_set_benchmark.cc b/absl/container/internal/raw_hash_set_benchmark.cc index 4c0a78a..da6e156 100644 --- a/absl/container/internal/raw_hash_set_benchmark.cc +++ b/absl/container/internal/raw_hash_set_benchmark.cc
@@ -17,7 +17,10 @@ #include <cmath> #include <cstddef> #include <cstdint> +#include <deque> +#include <functional> #include <limits> +#include <memory> #include <numeric> #include <random> #include <string> @@ -29,9 +32,11 @@ #include "absl/base/internal/raw_logging.h" #include "absl/container/internal/container_memory.h" #include "absl/container/internal/hash_function_defaults.h" +#include "absl/container/internal/hashtable_control_bytes.h" #include "absl/container/internal/raw_hash_set.h" #include "absl/random/random.h" #include "absl/strings/str_format.h" +#include "absl/strings/string_view.h" #include "benchmark/benchmark.h" namespace absl {
diff --git a/absl/container/internal/test_instance_tracker.h b/absl/container/internal/test_instance_tracker.h index 5ff6fd7..ab1e3bc 100644 --- a/absl/container/internal/test_instance_tracker.h +++ b/absl/container/internal/test_instance_tracker.h
@@ -17,6 +17,7 @@ #include <cstdlib> #include <ostream> +#include <utility> #include "absl/types/compare.h"
diff --git a/absl/container/internal/test_instance_tracker_test.cc b/absl/container/internal/test_instance_tracker_test.cc index 1c6a4fa..58f1bfb 100644 --- a/absl/container/internal/test_instance_tracker_test.cc +++ b/absl/container/internal/test_instance_tracker_test.cc
@@ -14,6 +14,8 @@ #include "absl/container/internal/test_instance_tracker.h" +#include <utility> + #include "gtest/gtest.h" namespace {
diff --git a/absl/container/internal/unordered_map_constructor_test.h b/absl/container/internal/unordered_map_constructor_test.h index 1076aea..fcbcbd9 100644 --- a/absl/container/internal/unordered_map_constructor_test.h +++ b/absl/container/internal/unordered_map_constructor_test.h
@@ -16,6 +16,8 @@ #define ABSL_CONTAINER_INTERNAL_UNORDERED_MAP_CONSTRUCTOR_TEST_H_ #include <algorithm> +#include <cstddef> +#include <initializer_list> #include <unordered_map> #include <vector>
diff --git a/absl/container/internal/unordered_map_lookup_test.h b/absl/container/internal/unordered_map_lookup_test.h index ba037c0..6405ae4 100644 --- a/absl/container/internal/unordered_map_lookup_test.h +++ b/absl/container/internal/unordered_map_lookup_test.h
@@ -15,6 +15,8 @@ #ifndef ABSL_CONTAINER_INTERNAL_UNORDERED_MAP_LOOKUP_TEST_H_ #define ABSL_CONTAINER_INTERNAL_UNORDERED_MAP_LOOKUP_TEST_H_ +#include <vector> + #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/container/internal/hash_generator_testing.h"
diff --git a/absl/container/internal/unordered_map_members_test.h b/absl/container/internal/unordered_map_members_test.h index e9f4979..6d7ebca 100644 --- a/absl/container/internal/unordered_map_members_test.h +++ b/absl/container/internal/unordered_map_members_test.h
@@ -15,7 +15,11 @@ #ifndef ABSL_CONTAINER_INTERNAL_UNORDERED_MAP_MEMBERS_TEST_H_ #define ABSL_CONTAINER_INTERNAL_UNORDERED_MAP_MEMBERS_TEST_H_ +#include <cstddef> +#include <memory> #include <type_traits> +#include <utility> + #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/meta/type_traits.h"
diff --git a/absl/container/internal/unordered_map_modifiers_test.h b/absl/container/internal/unordered_map_modifiers_test.h index bb41e07..38605d8 100644 --- a/absl/container/internal/unordered_map_modifiers_test.h +++ b/absl/container/internal/unordered_map_modifiers_test.h
@@ -15,8 +15,10 @@ #ifndef ABSL_CONTAINER_INTERNAL_UNORDERED_MAP_MODIFIERS_TEST_H_ #define ABSL_CONTAINER_INTERNAL_UNORDERED_MAP_MODIFIERS_TEST_H_ +#include <cstddef> #include <memory> #include <type_traits> +#include <vector> #include "gmock/gmock.h" #include "gtest/gtest.h"
diff --git a/absl/container/internal/unordered_map_test.cc b/absl/container/internal/unordered_map_test.cc index 9cbf512..badd6b2 100644 --- a/absl/container/internal/unordered_map_test.cc +++ b/absl/container/internal/unordered_map_test.cc
@@ -13,8 +13,12 @@ // limitations under the License. #include <memory> +#include <string> #include <unordered_map> +#include <utility> +#include "gtest/gtest.h" +#include "absl/container/internal/hash_policy_testing.h" #include "absl/container/internal/unordered_map_constructor_test.h" #include "absl/container/internal/unordered_map_lookup_test.h" #include "absl/container/internal/unordered_map_members_test.h"
diff --git a/absl/container/internal/unordered_set_constructor_test.h b/absl/container/internal/unordered_set_constructor_test.h index 7038a0c..47b59f3 100644 --- a/absl/container/internal/unordered_set_constructor_test.h +++ b/absl/container/internal/unordered_set_constructor_test.h
@@ -16,6 +16,8 @@ #define ABSL_CONTAINER_INTERNAL_UNORDERED_SET_CONSTRUCTOR_TEST_H_ #include <algorithm> +#include <cstddef> +#include <initializer_list> #include <unordered_set> #include <vector>
diff --git a/absl/container/internal/unordered_set_lookup_test.h b/absl/container/internal/unordered_set_lookup_test.h index 932c320..4edb962 100644 --- a/absl/container/internal/unordered_set_lookup_test.h +++ b/absl/container/internal/unordered_set_lookup_test.h
@@ -15,6 +15,9 @@ #ifndef ABSL_CONTAINER_INTERNAL_UNORDERED_SET_LOOKUP_TEST_H_ #define ABSL_CONTAINER_INTERNAL_UNORDERED_SET_LOOKUP_TEST_H_ +#include <type_traits> +#include <vector> + #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/container/internal/hash_generator_testing.h"
diff --git a/absl/container/internal/unordered_set_members_test.h b/absl/container/internal/unordered_set_members_test.h index b416fef..6cc173b 100644 --- a/absl/container/internal/unordered_set_members_test.h +++ b/absl/container/internal/unordered_set_members_test.h
@@ -15,7 +15,10 @@ #ifndef ABSL_CONTAINER_INTERNAL_UNORDERED_SET_MEMBERS_TEST_H_ #define ABSL_CONTAINER_INTERNAL_UNORDERED_SET_MEMBERS_TEST_H_ +#include <cstddef> +#include <memory> #include <type_traits> + #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/meta/type_traits.h"
diff --git a/absl/container/internal/unordered_set_modifiers_test.h b/absl/container/internal/unordered_set_modifiers_test.h index 1d686af..e7ed774 100644 --- a/absl/container/internal/unordered_set_modifiers_test.h +++ b/absl/container/internal/unordered_set_modifiers_test.h
@@ -15,7 +15,9 @@ #ifndef ABSL_CONTAINER_INTERNAL_UNORDERED_SET_MODIFIERS_TEST_H_ #define ABSL_CONTAINER_INTERNAL_UNORDERED_SET_MODIFIERS_TEST_H_ +#include <cstddef> #include <type_traits> +#include <vector> #include "gmock/gmock.h" #include "gtest/gtest.h"
diff --git a/absl/container/internal/unordered_set_test.cc b/absl/container/internal/unordered_set_test.cc index a134b53..d03403b 100644 --- a/absl/container/internal/unordered_set_test.cc +++ b/absl/container/internal/unordered_set_test.cc
@@ -12,8 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include <string> #include <unordered_set> +#include "gtest/gtest.h" +#include "absl/container/internal/hash_policy_testing.h" #include "absl/container/internal/unordered_set_constructor_test.h" #include "absl/container/internal/unordered_set_lookup_test.h" #include "absl/container/internal/unordered_set_members_test.h"
diff --git a/absl/container/sample_element_size_test.cc b/absl/container/sample_element_size_test.cc index 9ce19fe..2993f2a 100644 --- a/absl/container/sample_element_size_test.cc +++ b/absl/container/sample_element_size_test.cc
@@ -13,6 +13,7 @@ // limitations under the License. #include <cstddef> +#include <cstring> #include <unordered_set> #include <utility> #include <vector>