Ver código fonte

Add missing standard library header inclusions (#5316)

Discovered by clang-tidy.
Thomas Köppe 1 ano atrás
pai
commit
bf32da8dad
100 arquivos alterados com 242 adições e 0 exclusões
  1. 3 0
      common/check_internal.cpp
  2. 4 0
      common/command_line.cpp
  3. 3 0
      common/exe_path.cpp
  4. 3 0
      common/exe_path_test.cpp
  5. 2 0
      common/hashing.cpp
  6. 1 0
      common/hashing_benchmark.cpp
  7. 3 0
      common/hashing_test.cpp
  8. 2 0
      common/raw_hashtable.cpp
  9. 3 0
      common/raw_hashtable_benchmark_helpers.cpp
  10. 2 0
      common/raw_hashtable_metadata_group_benchmark.cpp
  11. 2 0
      common/set_benchmark.cpp
  12. 1 0
      common/string_helpers.cpp
  13. 1 0
      common/string_helpers_test.cpp
  14. 2 0
      common/vlog_test.cpp
  15. 1 0
      testing/base/capture_std_streams.cpp
  16. 1 0
      testing/base/file_helpers.cpp
  17. 1 0
      testing/base/global_exe_path.cpp
  18. 4 0
      testing/base/source_gen.cpp
  19. 3 0
      testing/base/source_gen_main.cpp
  20. 2 0
      testing/base/source_gen_test.cpp
  21. 2 0
      testing/file_test/autoupdate.cpp
  22. 7 0
      testing/file_test/file_test_base.cpp
  23. 5 0
      testing/file_test/file_test_base_test.cpp
  24. 2 0
      testing/file_test/manifest.cpp
  25. 3 0
      testing/file_test/run_test.cpp
  26. 3 0
      testing/file_test/test_file.cpp
  27. 3 0
      toolchain/base/int.cpp
  28. 1 0
      toolchain/base/int_test.cpp
  29. 2 0
      toolchain/base/value_store_test.cpp
  30. 2 0
      toolchain/check/call.cpp
  31. 3 0
      toolchain/check/check.cpp
  32. 1 0
      toolchain/check/check_unit.cpp
  33. 3 0
      toolchain/check/context.cpp
  34. 2 0
      toolchain/check/control_flow.cpp
  35. 1 0
      toolchain/check/convert.cpp
  36. 2 0
      toolchain/check/decl_name_stack.cpp
  37. 3 0
      toolchain/check/deferred_definition_worklist.cpp
  38. 3 0
      toolchain/check/diagnostic_emitter.cpp
  39. 2 0
      toolchain/check/dump.cpp
  40. 5 0
      toolchain/check/eval.cpp
  41. 3 0
      toolchain/check/handle_class.cpp
  42. 3 0
      toolchain/check/handle_function.cpp
  43. 3 0
      toolchain/check/handle_impl.cpp
  44. 2 0
      toolchain/check/handle_interface.cpp
  45. 2 0
      toolchain/check/handle_let_and_var.cpp
  46. 2 0
      toolchain/check/handle_literal.cpp
  47. 1 0
      toolchain/check/impl_lookup.cpp
  48. 3 0
      toolchain/check/import.cpp
  49. 2 0
      toolchain/check/import_cpp.cpp
  50. 5 0
      toolchain/check/import_ref.cpp
  51. 3 0
      toolchain/check/interface.cpp
  52. 2 0
      toolchain/check/modifiers.cpp
  53. 2 0
      toolchain/check/name_lookup.cpp
  54. 4 0
      toolchain/check/node_id_traversal.cpp
  55. 1 0
      toolchain/check/pattern_match.cpp
  56. 2 0
      toolchain/check/scope_stack.cpp
  57. 2 0
      toolchain/codegen/codegen.cpp
  58. 2 0
      toolchain/diagnostics/mocks.cpp
  59. 2 0
      toolchain/driver/clang_runner.cpp
  60. 1 0
      toolchain/driver/clang_runner_test.cpp
  61. 2 0
      toolchain/driver/clang_subcommand.cpp
  62. 1 0
      toolchain/driver/compile_benchmark.cpp
  63. 7 0
      toolchain/driver/compile_subcommand.cpp
  64. 2 0
      toolchain/driver/driver_test.cpp
  65. 1 0
      toolchain/driver/lld_runner.cpp
  66. 2 0
      toolchain/driver/lld_runner_test.cpp
  67. 2 0
      toolchain/driver/lld_subcommand.cpp
  68. 1 0
      toolchain/driver/llvm_runner.cpp
  69. 2 0
      toolchain/driver/llvm_runner_test.cpp
  70. 2 0
      toolchain/driver/tool_runner_base.cpp
  71. 2 0
      toolchain/install/busybox_info_test.cpp
  72. 1 0
      toolchain/install/busybox_main.cpp
  73. 1 0
      toolchain/install/install_paths.cpp
  74. 3 0
      toolchain/install/install_paths_test.cpp
  75. 3 0
      toolchain/install/install_paths_test_helpers.cpp
  76. 2 0
      toolchain/language_server/context.cpp
  77. 3 0
      toolchain/language_server/handle_document_symbol.cpp
  78. 2 0
      toolchain/language_server/handle_initialize.cpp
  79. 2 0
      toolchain/language_server/handle_shutdown.cpp
  80. 4 0
      toolchain/language_server/handle_text_document.cpp
  81. 2 0
      toolchain/language_server/incoming_messages.cpp
  82. 2 0
      toolchain/language_server/language_server.cpp
  83. 2 0
      toolchain/lex/dump.cpp
  84. 2 0
      toolchain/lex/lex.cpp
  85. 3 0
      toolchain/lex/numeric_literal.cpp
  86. 3 0
      toolchain/lex/numeric_literal_test.cpp
  87. 3 0
      toolchain/lex/string_literal.cpp
  88. 3 0
      toolchain/lex/string_literal_benchmark.cpp
  89. 4 0
      toolchain/lex/string_literal_test.cpp
  90. 3 0
      toolchain/lex/tokenized_buffer.cpp
  91. 2 0
      toolchain/lex/tokenized_buffer_benchmark.cpp
  92. 2 0
      toolchain/lex/tokenized_buffer_test.cpp
  93. 5 0
      toolchain/lower/file_context.cpp
  94. 3 0
      toolchain/lower/handle_call.cpp
  95. 3 0
      toolchain/lower/lower.cpp
  96. 2 0
      toolchain/lower/mangler.cpp
  97. 1 0
      toolchain/parse/context.cpp
  98. 2 0
      toolchain/parse/dump.cpp
  99. 2 0
      toolchain/parse/extract.cpp
  100. 2 0
      toolchain/parse/handle_decl_scope_loop.cpp

+ 3 - 0
common/check_internal.cpp

@@ -4,6 +4,9 @@
 
 #include "common/check_internal.h"
 
+#include <cstdlib>
+#include <string>
+
 #include "common/ostream.h"
 #include "llvm/Support/Signals.h"
 

+ 4 - 0
common/command_line.cpp

@@ -4,7 +4,11 @@
 
 #include "common/command_line.h"
 
+#include <array>
 #include <memory>
+#include <optional>
+#include <string>
+#include <utility>
 
 #include "common/raw_string_ostream.h"
 #include "llvm/ADT/DenseMap.h"

+ 3 - 0
common/exe_path.cpp

@@ -4,6 +4,9 @@
 
 #include "common/exe_path.h"
 
+#include <string>
+#include <utility>
+
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Program.h"

+ 3 - 0
common/exe_path_test.cpp

@@ -6,6 +6,9 @@
 
 #include <gtest/gtest.h>
 
+#include <string>
+#include <system_error>
+
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"

+ 2 - 0
common/hashing.cpp

@@ -4,6 +4,8 @@
 
 #include "common/hashing.h"
 
+#include <cstddef>
+
 namespace Carbon {
 
 auto Hasher::HashSizedBytesLarge(llvm::ArrayRef<std::byte> bytes) -> void {

+ 1 - 0
common/hashing_benchmark.cpp

@@ -5,6 +5,7 @@
 #include <benchmark/benchmark.h>
 
 #include <algorithm>
+#include <array>
 #include <cstddef>
 #include <numbers>
 

+ 3 - 0
common/hashing_test.cpp

@@ -8,7 +8,10 @@
 #include <gtest/gtest.h>
 
 #include <concepts>
+#include <string>
+#include <tuple>
 #include <type_traits>
+#include <utility>
 
 #include "common/raw_string_ostream.h"
 #include "llvm/ADT/Sequence.h"

+ 2 - 0
common/raw_hashtable.cpp

@@ -4,6 +4,8 @@
 
 #include "common/raw_hashtable.h"
 
+#include <cstddef>
+
 namespace Carbon::RawHashtable {
 
 volatile std::byte global_addr_seed{1};

+ 3 - 0
common/raw_hashtable_benchmark_helpers.cpp

@@ -4,8 +4,11 @@
 
 #include "common/raw_hashtable_benchmark_helpers.h"
 
+#include <array>
 #include <cstddef>
 #include <forward_list>
+#include <utility>
+#include <vector>
 
 namespace Carbon::RawHashtable {
 

+ 2 - 0
common/raw_hashtable_metadata_group_benchmark.cpp

@@ -5,6 +5,8 @@
 #include <benchmark/benchmark.h>
 
 #include <algorithm>
+#include <array>
+#include <numeric>
 
 #include "absl/random/random.h"
 #include "common/raw_hashtable_metadata_group.h"

+ 2 - 0
common/set_benchmark.cpp

@@ -4,6 +4,8 @@
 
 #include <benchmark/benchmark.h>
 
+#include <type_traits>
+
 #include "absl/container/flat_hash_set.h"
 #include "common/raw_hashtable_benchmark_helpers.h"
 #include "common/set.h"

+ 1 - 0
common/string_helpers.cpp

@@ -6,6 +6,7 @@
 
 #include <algorithm>
 #include <optional>
+#include <string>
 
 #include "common/check.h"
 #include "llvm/ADT/StringExtras.h"

+ 1 - 0
common/string_helpers_test.cpp

@@ -7,6 +7,7 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <optional>
 #include <string>
 
 using ::testing::Eq;

+ 2 - 0
common/vlog_test.cpp

@@ -7,6 +7,8 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <string>
+
 #include "common/raw_string_ostream.h"
 
 namespace Carbon::Testing {

+ 1 - 0
testing/base/capture_std_streams.cpp

@@ -8,6 +8,7 @@
 
 #include <fstream>
 #include <sstream>
+#include <string>
 
 #include "common/ostream.h"
 

+ 1 - 0
testing/base/file_helpers.cpp

@@ -9,6 +9,7 @@
 #include <cstdlib>
 #include <fstream>
 #include <sstream>
+#include <string>
 #include <system_error>
 
 namespace Carbon::Testing {

+ 1 - 0
testing/base/global_exe_path.cpp

@@ -4,6 +4,7 @@
 
 #include "testing/base/global_exe_path.h"
 
+#include <optional>
 #include <string>
 
 #include "common/check.h"

+ 4 - 0
testing/base/source_gen.cpp

@@ -4,7 +4,11 @@
 
 #include "testing/base/source_gen.h"
 
+#include <algorithm>
+#include <array>
 #include <numeric>
+#include <string>
+#include <utility>
 
 #include "common/raw_string_ostream.h"
 #include "llvm/ADT/ArrayRef.h"

+ 3 - 0
testing/base/source_gen_main.cpp

@@ -2,6 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <optional>
+#include <system_error>
+
 #include "common/bazel_working_dir.h"
 #include "common/command_line.h"
 #include "common/init_llvm.h"

+ 2 - 0
testing/base/source_gen_test.cpp

@@ -7,6 +7,8 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <string>
+
 #include "common/set.h"
 #include "testing/base/global_exe_path.h"
 #include "toolchain/driver/driver.h"

+ 2 - 0
testing/file_test/autoupdate.cpp

@@ -5,6 +5,8 @@
 #include "testing/file_test/autoupdate.h"
 
 #include <fstream>
+#include <string>
+#include <utility>
 
 #include "absl/strings/str_replace.h"
 #include "absl/strings/string_view.h"

+ 7 - 0
testing/file_test/file_test_base.cpp

@@ -21,9 +21,16 @@
 
 #include "testing/file_test/file_test_base.h"
 
+#include <atomic>
+#include <cstdlib>
 #include <filesystem>
+#include <functional>
+#include <memory>
+#include <mutex>
 #include <optional>
 #include <string>
+#include <string_view>
+#include <system_error>
 #include <utility>
 
 #include "absl/flags/flag.h"

+ 5 - 0
testing/file_test/file_test_base_test.cpp

@@ -7,6 +7,11 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <functional>
+#include <memory>
+#include <optional>
+#include <string>
+
 #include "common/ostream.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringSwitch.h"

+ 2 - 0
testing/file_test/manifest.cpp

@@ -4,6 +4,8 @@
 
 #include "testing/file_test/manifest.h"
 
+#include <string>
+
 // The test manifest, produced by `manifest_as_cpp`.
 // NOLINTNEXTLINE(readability-identifier-naming): Constant in practice.
 extern const char* CarbonFileTestManifest[];

+ 3 - 0
testing/file_test/run_test.cpp

@@ -6,6 +6,9 @@
 
 #include <gtest/gtest.h>
 
+#include <string>
+#include <utility>
+
 #include "llvm/ADT/ScopeExit.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringMap.h"

+ 3 - 0
testing/file_test/test_file.cpp

@@ -5,6 +5,9 @@
 #include "testing/file_test/test_file.h"
 
 #include <fstream>
+#include <optional>
+#include <string>
+#include <utility>
 
 #include "common/check.h"
 #include "common/error.h"

+ 3 - 0
toolchain/base/int.cpp

@@ -4,6 +4,9 @@
 
 #include "toolchain/base/int.h"
 
+#include <algorithm>
+#include <string>
+
 namespace Carbon {
 
 auto IntStore::CanonicalBitWidth(int significant_bits) -> int {

+ 1 - 0
toolchain/base/int_test.cpp

@@ -7,6 +7,7 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <algorithm>
 #include <limits>
 
 namespace Carbon::Testing {

+ 2 - 0
toolchain/base/value_store_test.cpp

@@ -7,6 +7,8 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <string>
+
 #include "toolchain/base/value_ids.h"
 
 namespace Carbon::Testing {

+ 2 - 0
toolchain/check/call.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/check/call.h"
 
+#include <optional>
+
 #include "toolchain/base/kind_switch.h"
 #include "toolchain/check/context.h"
 #include "toolchain/check/control_flow.h"

+ 3 - 0
toolchain/check/check.cpp

@@ -4,6 +4,9 @@
 
 #include "toolchain/check/check.h"
 
+#include <string>
+#include <utility>
+
 #include "common/check.h"
 #include "common/map.h"
 #include "toolchain/check/check_unit.h"

+ 1 - 0
toolchain/check/check_unit.cpp

@@ -5,6 +5,7 @@
 #include "toolchain/check/check_unit.h"
 
 #include <string>
+#include <utility>
 
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/StringRef.h"

+ 3 - 0
toolchain/check/context.cpp

@@ -4,6 +4,9 @@
 
 #include "toolchain/check/context.h"
 
+#include <string>
+#include <utility>
+
 #include "common/check.h"
 
 namespace Carbon::Check {

+ 2 - 0
toolchain/check/control_flow.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/check/control_flow.h"
 
+#include <initializer_list>
+
 #include "toolchain/base/kind_switch.h"
 #include "toolchain/check/call.h"
 #include "toolchain/check/inst.h"

+ 1 - 0
toolchain/check/convert.cpp

@@ -4,6 +4,7 @@
 
 #include "toolchain/check/convert.h"
 
+#include <optional>
 #include <string>
 #include <utility>
 

+ 2 - 0
toolchain/check/decl_name_stack.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/check/decl_name_stack.h"
 
+#include <utility>
+
 #include "toolchain/base/kind_switch.h"
 #include "toolchain/check/context.h"
 #include "toolchain/check/diagnostic_helpers.h"

+ 3 - 0
toolchain/check/deferred_definition_worklist.cpp

@@ -4,6 +4,9 @@
 
 #include "toolchain/check/deferred_definition_worklist.h"
 
+#include <algorithm>
+#include <optional>
+
 #include "common/variant_helpers.h"
 #include "common/vlog.h"
 #include "toolchain/check/handle.h"

+ 3 - 0
toolchain/check/diagnostic_emitter.cpp

@@ -4,6 +4,9 @@
 
 #include "toolchain/check/diagnostic_emitter.h"
 
+#include <algorithm>
+#include <string>
+
 #include "common/raw_string_ostream.h"
 #include "toolchain/sem_ir/absolute_node_id.h"
 #include "toolchain/sem_ir/stringify.h"

+ 2 - 0
toolchain/check/dump.cpp

@@ -15,6 +15,8 @@
 
 #include "toolchain/lex/dump.h"
 
+#include <string>
+
 #include "common/check.h"
 #include "common/raw_string_ostream.h"
 #include "toolchain/check/context.h"

+ 5 - 0
toolchain/check/eval.cpp

@@ -4,6 +4,11 @@
 
 #include "toolchain/check/eval.h"
 
+#include <algorithm>
+#include <array>
+#include <optional>
+#include <utility>
+
 #include "toolchain/base/kind_switch.h"
 #include "toolchain/check/action.h"
 #include "toolchain/check/diagnostic_helpers.h"

+ 3 - 0
toolchain/check/handle_class.cpp

@@ -2,6 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <optional>
+#include <tuple>
+
 #include "toolchain/base/kind_switch.h"
 #include "toolchain/check/class.h"
 #include "toolchain/check/context.h"

+ 3 - 0
toolchain/check/handle_function.cpp

@@ -2,6 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <optional>
+#include <utility>
+
 #include "toolchain/base/kind_switch.h"
 #include "toolchain/check/context.h"
 #include "toolchain/check/control_flow.h"

+ 3 - 0
toolchain/check/handle_impl.cpp

@@ -2,6 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <optional>
+#include <utility>
+
 #include "toolchain/check/context.h"
 #include "toolchain/check/convert.h"
 #include "toolchain/check/decl_name_stack.h"

+ 2 - 0
toolchain/check/handle_interface.cpp

@@ -2,6 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <tuple>
+
 #include "toolchain/check/context.h"
 #include "toolchain/check/eval.h"
 #include "toolchain/check/facet_type.h"

+ 2 - 0
toolchain/check/handle_let_and_var.cpp

@@ -2,6 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <optional>
+
 #include "toolchain/check/context.h"
 #include "toolchain/check/control_flow.h"
 #include "toolchain/check/convert.h"

+ 2 - 0
toolchain/check/handle_literal.cpp

@@ -2,6 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <cmath>
+
 #include "toolchain/check/call.h"
 #include "toolchain/check/context.h"
 #include "toolchain/check/handle.h"

+ 1 - 0
toolchain/check/impl_lookup.cpp

@@ -5,6 +5,7 @@
 #include "toolchain/check/impl_lookup.h"
 
 #include <algorithm>
+#include <utility>
 #include <variant>
 
 #include "toolchain/base/kind_switch.h"

+ 3 - 0
toolchain/check/import.cpp

@@ -4,6 +4,9 @@
 
 #include "toolchain/check/import.h"
 
+#include <optional>
+#include <utility>
+
 #include "common/check.h"
 #include "common/map.h"
 #include "toolchain/base/kind_switch.h"

+ 2 - 0
toolchain/check/import_cpp.cpp

@@ -7,6 +7,8 @@
 #include <memory>
 #include <optional>
 #include <string>
+#include <tuple>
+#include <utility>
 
 #include "clang/Frontend/TextDiagnostic.h"
 #include "clang/Sema/Lookup.h"

+ 5 - 0
toolchain/check/import_ref.cpp

@@ -4,6 +4,11 @@
 
 #include "toolchain/check/import_ref.h"
 
+#include <optional>
+#include <tuple>
+#include <type_traits>
+#include <utility>
+
 #include "common/check.h"
 #include "toolchain/base/kind_switch.h"
 #include "toolchain/check/context.h"

+ 3 - 0
toolchain/check/interface.cpp

@@ -4,6 +4,9 @@
 
 #include "toolchain/check/interface.h"
 
+#include <algorithm>
+#include <cstddef>
+
 #include "toolchain/check/context.h"
 #include "toolchain/check/eval.h"
 #include "toolchain/check/generic.h"

+ 2 - 0
toolchain/check/modifiers.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/check/modifiers.h"
 
+#include <optional>
+
 #include "toolchain/check/decl_introducer_state.h"
 
 namespace Carbon::Check {

+ 2 - 0
toolchain/check/name_lookup.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/check/name_lookup.h"
 
+#include <optional>
+
 #include "toolchain/check/generic.h"
 #include "toolchain/check/import.h"
 #include "toolchain/check/import_cpp.h"

+ 4 - 0
toolchain/check/node_id_traversal.cpp

@@ -4,6 +4,10 @@
 
 #include "toolchain/check/node_id_traversal.h"
 
+#include <optional>
+#include <utility>
+#include <variant>
+
 #include "toolchain/check/handle.h"
 
 namespace Carbon::Check {

+ 1 - 0
toolchain/check/pattern_match.cpp

@@ -5,6 +5,7 @@
 #include "toolchain/check/pattern_match.h"
 
 #include <functional>
+#include <utility>
 #include <vector>
 
 #include "llvm/ADT/STLExtras.h"

+ 2 - 0
toolchain/check/scope_stack.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/check/scope_stack.h"
 
+#include <utility>
+
 #include "common/check.h"
 #include "toolchain/sem_ir/ids.h"
 

+ 2 - 0
toolchain/codegen/codegen.cpp

@@ -5,6 +5,8 @@
 #include "toolchain/codegen/codegen.h"
 
 #include <memory>
+#include <optional>
+#include <string>
 
 #include "llvm/IR/LegacyPassManager.h"
 #include "llvm/MC/TargetRegistry.h"

+ 2 - 0
toolchain/diagnostics/mocks.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/diagnostics/mocks.h"
 
+#include <ostream>
+
 namespace Carbon::Diagnostics {
 
 auto PrintTo(const Diagnostic& diagnostic, std::ostream* os) -> void {

+ 2 - 0
toolchain/driver/clang_runner.cpp

@@ -8,6 +8,8 @@
 #include <memory>
 #include <numeric>
 #include <optional>
+#include <string>
+#include <utility>
 
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/DiagnosticOptions.h"

+ 1 - 0
toolchain/driver/clang_runner_test.cpp

@@ -9,6 +9,7 @@
 
 #include <filesystem>
 #include <fstream>
+#include <string>
 #include <utility>
 
 #include "common/check.h"

+ 2 - 0
toolchain/driver/clang_subcommand.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/driver/clang_subcommand.h"
 
+#include <string>
+
 #include "llvm/TargetParser/Host.h"
 #include "toolchain/driver/clang_runner.h"
 

+ 1 - 0
toolchain/driver/compile_benchmark.cpp

@@ -4,6 +4,7 @@
 
 #include <benchmark/benchmark.h>
 
+#include <algorithm>
 #include <string>
 
 #include "testing/base/global_exe_path.h"

+ 7 - 0
toolchain/driver/compile_subcommand.cpp

@@ -4,6 +4,13 @@
 
 #include "toolchain/driver/compile_subcommand.h"
 
+#include <functional>
+#include <memory>
+#include <optional>
+#include <string>
+#include <system_error>
+#include <utility>
+
 #include "common/vlog.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/ScopeExit.h"

+ 2 - 0
toolchain/driver/driver_test.cpp

@@ -9,6 +9,8 @@
 
 #include <filesystem>
 #include <fstream>
+#include <string>
+#include <system_error>
 #include <utility>
 
 #include "common/raw_string_ostream.h"

+ 1 - 0
toolchain/driver/lld_runner.cpp

@@ -8,6 +8,7 @@
 #include <memory>
 #include <numeric>
 #include <optional>
+#include <string>
 
 #include "common/vlog.h"
 #include "llvm/ADT/ArrayRef.h"

+ 2 - 0
toolchain/driver/lld_runner_test.cpp

@@ -9,6 +9,8 @@
 
 #include <filesystem>
 #include <fstream>
+#include <string>
+#include <tuple>
 #include <utility>
 
 #include "common/check.h"

+ 2 - 0
toolchain/driver/lld_subcommand.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/driver/lld_subcommand.h"
 
+#include <string>
+
 #include "llvm/TargetParser/Host.h"
 #include "llvm/TargetParser/Triple.h"
 #include "toolchain/driver/lld_runner.h"

+ 1 - 0
toolchain/driver/llvm_runner.cpp

@@ -8,6 +8,7 @@
 #include <memory>
 #include <numeric>
 #include <optional>
+#include <string>
 
 #include "common/vlog.h"
 #include "lld/Common/Driver.h"

+ 2 - 0
toolchain/driver/llvm_runner_test.cpp

@@ -7,6 +7,8 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <string>
+
 #include "common/ostream.h"
 #include "common/raw_string_ostream.h"
 #include "llvm/ADT/ScopeExit.h"

+ 2 - 0
toolchain/driver/tool_runner_base.cpp

@@ -4,7 +4,9 @@
 
 #include "toolchain/driver/tool_runner_base.h"
 
+#include <array>
 #include <memory>
+#include <optional>
 
 #include "common/vlog.h"
 #include "llvm/ADT/ArrayRef.h"

+ 2 - 0
toolchain/install/busybox_info_test.cpp

@@ -9,6 +9,8 @@
 
 #include <cstdlib>
 #include <fstream>
+#include <optional>
+#include <system_error>
 
 #include "common/check.h"
 #include "llvm/ADT/ScopeExit.h"

+ 1 - 0
toolchain/install/busybox_main.cpp

@@ -5,6 +5,7 @@
 #include <unistd.h>
 
 #include <cstdlib>
+#include <string>
 
 #include "common/bazel_working_dir.h"
 #include "common/error.h"

+ 1 - 0
toolchain/install/install_paths.cpp

@@ -5,6 +5,7 @@
 #include "toolchain/install/install_paths.h"
 
 #include <memory>
+#include <string>
 
 #include "common/check.h"
 #include "llvm/ADT/StringExtras.h"

+ 3 - 0
toolchain/install/install_paths_test.cpp

@@ -7,6 +7,9 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <memory>
+#include <string>
+
 #include "common/check.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/FileSystem.h"

+ 3 - 0
toolchain/install/install_paths_test_helpers.cpp

@@ -4,6 +4,9 @@
 
 #include "toolchain/install/install_paths_test_helpers.h"
 
+#include <memory>
+#include <utility>
+
 #include "testing/base/global_exe_path.h"
 
 namespace Carbon::Testing {

+ 2 - 0
toolchain/language_server/context.cpp

@@ -5,6 +5,8 @@
 #include "toolchain/language_server/context.h"
 
 #include <memory>
+#include <optional>
+#include <utility>
 
 #include "common/check.h"
 #include "common/raw_string_ostream.h"

+ 3 - 0
toolchain/language_server/handle_document_symbol.cpp

@@ -3,6 +3,9 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
 #include <optional>
+#include <string>
+#include <utility>
+#include <vector>
 
 #include "common/check.h"
 #include "toolchain/language_server/handle.h"

+ 2 - 0
toolchain/language_server/handle_initialize.cpp

@@ -2,6 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <utility>
+
 #include "toolchain/language_server/handle.h"
 
 namespace Carbon::LanguageServer {

+ 2 - 0
toolchain/language_server/handle_shutdown.cpp

@@ -2,6 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <cstddef>
+
 #include "toolchain/language_server/handle.h"
 
 namespace Carbon::LanguageServer {

+ 4 - 0
toolchain/language_server/handle_text_document.cpp

@@ -2,6 +2,10 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <string>
+#include <tuple>
+#include <vector>
+
 #include "toolchain/language_server/handle.h"
 
 namespace Carbon::LanguageServer {

+ 2 - 0
toolchain/language_server/incoming_messages.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/language_server/incoming_messages.h"
 
+#include <utility>
+
 #include "common/ostream.h"
 #include "common/raw_string_ostream.h"
 #include "toolchain/language_server/handle.h"

+ 2 - 0
toolchain/language_server/language_server.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/language_server/language_server.h"
 
+#include <memory>
+
 #include "clang-tools-extra/clangd/LSPBinder.h"
 #include "clang-tools-extra/clangd/Transport.h"
 #include "clang-tools-extra/clangd/support/Logger.h"

+ 2 - 0
toolchain/lex/dump.cpp

@@ -6,6 +6,8 @@
 
 #include "toolchain/lex/dump.h"
 
+#include <string>
+
 #include "common/raw_string_ostream.h"
 
 namespace Carbon::Lex {

+ 2 - 0
toolchain/lex/lex.cpp

@@ -6,6 +6,8 @@
 
 #include <array>
 #include <limits>
+#include <optional>
+#include <utility>
 
 #include "common/check.h"
 #include "common/variant_helpers.h"

+ 3 - 0
toolchain/lex/numeric_literal.cpp

@@ -4,7 +4,10 @@
 
 #include "toolchain/lex/numeric_literal.h"
 
+#include <algorithm>
 #include <bitset>
+#include <iterator>
+#include <optional>
 
 #include "common/check.h"
 #include "llvm/ADT/StringExtras.h"

+ 3 - 0
toolchain/lex/numeric_literal_test.cpp

@@ -7,6 +7,9 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <optional>
+#include <string>
+
 #include "common/check.h"
 #include "toolchain/diagnostics/diagnostic_emitter.h"
 #include "toolchain/lex/test_helpers.h"

+ 3 - 0
toolchain/lex/string_literal.cpp

@@ -4,6 +4,9 @@
 
 #include "toolchain/lex/string_literal.h"
 
+#include <initializer_list>
+#include <optional>
+
 #include "common/check.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringExtras.h"

+ 3 - 0
toolchain/lex/string_literal_benchmark.cpp

@@ -4,6 +4,9 @@
 
 #include <benchmark/benchmark.h>
 
+#include <string>
+#include <string_view>
+
 #include "toolchain/diagnostics/null_diagnostics.h"
 #include "toolchain/lex/string_literal.h"
 

+ 4 - 0
toolchain/lex/string_literal_test.cpp

@@ -7,6 +7,10 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <optional>
+#include <string>
+#include <utility>
+
 #include "common/check.h"
 #include "toolchain/diagnostics/diagnostic_emitter.h"
 #include "toolchain/lex/test_helpers.h"

+ 3 - 0
toolchain/lex/tokenized_buffer.cpp

@@ -6,6 +6,9 @@
 
 #include <algorithm>
 #include <cmath>
+#include <iterator>
+#include <optional>
+#include <utility>
 
 #include "common/check.h"
 #include "common/string_helpers.h"

+ 2 - 0
toolchain/lex/tokenized_buffer_benchmark.cpp

@@ -5,6 +5,8 @@
 #include <benchmark/benchmark.h>
 
 #include <algorithm>
+#include <array>
+#include <string>
 #include <utility>
 
 #include "absl/random/random.h"

+ 2 - 0
toolchain/lex/tokenized_buffer_test.cpp

@@ -7,9 +7,11 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
+#include <algorithm>
 #include <cmath>
 #include <forward_list>
 #include <iterator>
+#include <string>
 
 #include "common/raw_string_ostream.h"
 #include "llvm/ADT/ArrayRef.h"

+ 5 - 0
toolchain/lower/file_context.cpp

@@ -4,6 +4,11 @@
 
 #include "toolchain/lower/file_context.h"
 
+#include <memory>
+#include <optional>
+#include <string>
+#include <utility>
+
 #include "common/check.h"
 #include "common/vlog.h"
 #include "llvm/ADT/STLExtras.h"

+ 3 - 0
toolchain/lower/handle_call.cpp

@@ -2,6 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <algorithm>
+#include <vector>
+
 #include "llvm/IR/Type.h"
 #include "llvm/IR/Value.h"
 #include "toolchain/lower/function_context.h"

+ 3 - 0
toolchain/lower/lower.cpp

@@ -4,6 +4,9 @@
 
 #include "toolchain/lower/lower.h"
 
+#include <memory>
+#include <optional>
+
 #include "toolchain/lower/file_context.h"
 
 namespace Carbon::Lower {

+ 2 - 0
toolchain/lower/mangler.cpp

@@ -4,6 +4,8 @@
 
 #include "toolchain/lower/mangler.h"
 
+#include <string>
+
 #include "common/raw_string_ostream.h"
 #include "toolchain/base/kind_switch.h"
 #include "toolchain/sem_ir/entry_point.h"

+ 1 - 0
toolchain/parse/context.cpp

@@ -4,6 +4,7 @@
 
 #include "toolchain/parse/context.h"
 
+#include <initializer_list>
 #include <optional>
 
 #include "common/check.h"

+ 2 - 0
toolchain/parse/dump.cpp

@@ -6,6 +6,8 @@
 
 #include "toolchain/parse/dump.h"
 
+#include <string>
+
 #include "common/raw_string_ostream.h"
 #include "toolchain/lex/dump.h"
 

+ 2 - 0
toolchain/parse/extract.cpp

@@ -2,6 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <initializer_list>
+#include <optional>
 #include <tuple>
 #include <typeinfo>
 #include <utility>

+ 2 - 0
toolchain/parse/handle_decl_scope_loop.cpp

@@ -2,6 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include <array>
+
 #include "toolchain/lex/token_kind.h"
 #include "toolchain/parse/context.h"
 #include "toolchain/parse/handle.h"

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff