Skip to content

Commit

Permalink
[libc++] Adds missing includes.
Browse files Browse the repository at this point in the history
This patch makes are code less dependant on transitive includes.

This was part of D145800. This patch will be abandoned, but these
changes are still useful. I manually verified declarations of the new
includes are used in these files.

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D148645
  • Loading branch information
mordante committed Apr 19, 2023
1 parent 05d04a0 commit d6cd425
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions libcxx/include/__format/buffer.h
Expand Up @@ -29,6 +29,7 @@
#include <__iterator/wrap_iter.h>
#include <__memory/addressof.h>
#include <__type_traits/add_pointer.h>
#include <__type_traits/conditional.h>
#include <__utility/move.h>
#include <cstddef>
#include <string_view>
Expand Down
1 change: 1 addition & 0 deletions libcxx/include/__random/seed_seq.h
Expand Up @@ -13,6 +13,7 @@
#include <__algorithm/fill.h>
#include <__algorithm/max.h>
#include <__config>
#include <__iterator/iterator_traits.h>
#include <cstdint>
#include <initializer_list>
#include <vector>
Expand Down
Expand Up @@ -11,6 +11,7 @@
// <vector>

#include <cstddef>
#include <memory>
#include <vector>

#include "test_macros.h"
Expand Down
Expand Up @@ -13,6 +13,7 @@

#include <cstddef>
#include <type_traits>
#include <memory>
#include <vector>

#include "count_new.h"
Expand Down
Expand Up @@ -12,6 +12,7 @@

#include <cassert>
#include <vector>
#include <utility>

#include "test_macros.h"

Expand Down
Expand Up @@ -13,6 +13,7 @@
// Validate whether the container can be copy-assigned with an ADL-hijacking operator&

#include <vector>
#include <utility>

#include "test_macros.h"
#include "operator_hijacker.h"
Expand Down
Expand Up @@ -14,6 +14,7 @@
// -> vector<typename iterator_traits<InputIterator>::value_type, Allocator>;
//

#include <algorithm>
#include <vector>
#include <cassert>
#include <cstddef>
Expand Down
Expand Up @@ -12,6 +12,7 @@
// Check that vector constructors don't leak memory when an operation inside the constructor throws an exception

#include <cstddef>
#include <memory>
#include <type_traits>
#include <vector>

Expand Down
Expand Up @@ -15,6 +15,7 @@
// Validate whether the container can be copy-assigned with an ADL-hijacking operator&

#include <vector>
#include <utility>

#include "test_macros.h"
#include "operator_hijacker.h"
Expand Down
Expand Up @@ -13,6 +13,7 @@
#include <cassert>
#include <ranges>
#include <type_traits>
#include <utility>
#include <vector>

struct DefaultConstructibleView : std::ranges::view_base {
Expand Down
Expand Up @@ -15,6 +15,7 @@

#include <optional>
#include <type_traits>
#include <memory>
#include <vector>
#include <cassert>

Expand Down
1 change: 1 addition & 0 deletions libcxx/test/support/nasty_containers.h
Expand Up @@ -13,6 +13,7 @@
#include <cstddef>
#include <vector>
#include <list>
#include <type_traits>

#include "test_macros.h"

Expand Down

0 comments on commit d6cd425

Please sign in to comment.