From bf32da8dad6a628fb1b04776b2f8e70299fe4f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Thu, 17 Apr 2025 16:37:57 +0100 Subject: [PATCH] Add missing standard library header inclusions (#5316) Discovered by clang-tidy. --- common/check_internal.cpp | 3 +++ common/command_line.cpp | 4 ++++ common/exe_path.cpp | 3 +++ common/exe_path_test.cpp | 3 +++ common/hashing.cpp | 2 ++ common/hashing_benchmark.cpp | 1 + common/hashing_test.cpp | 3 +++ common/raw_hashtable.cpp | 2 ++ common/raw_hashtable_benchmark_helpers.cpp | 3 +++ common/raw_hashtable_metadata_group_benchmark.cpp | 2 ++ common/set_benchmark.cpp | 2 ++ common/string_helpers.cpp | 1 + common/string_helpers_test.cpp | 1 + common/vlog_test.cpp | 2 ++ testing/base/capture_std_streams.cpp | 1 + testing/base/file_helpers.cpp | 1 + testing/base/global_exe_path.cpp | 1 + testing/base/source_gen.cpp | 4 ++++ testing/base/source_gen_main.cpp | 3 +++ testing/base/source_gen_test.cpp | 2 ++ testing/file_test/autoupdate.cpp | 2 ++ testing/file_test/file_test_base.cpp | 7 +++++++ testing/file_test/file_test_base_test.cpp | 5 +++++ testing/file_test/manifest.cpp | 2 ++ testing/file_test/run_test.cpp | 3 +++ testing/file_test/test_file.cpp | 3 +++ toolchain/base/int.cpp | 3 +++ toolchain/base/int_test.cpp | 1 + toolchain/base/value_store_test.cpp | 2 ++ toolchain/check/call.cpp | 2 ++ toolchain/check/check.cpp | 3 +++ toolchain/check/check_unit.cpp | 1 + toolchain/check/context.cpp | 3 +++ toolchain/check/control_flow.cpp | 2 ++ toolchain/check/convert.cpp | 1 + toolchain/check/decl_name_stack.cpp | 2 ++ toolchain/check/deferred_definition_worklist.cpp | 3 +++ toolchain/check/diagnostic_emitter.cpp | 3 +++ toolchain/check/dump.cpp | 2 ++ toolchain/check/eval.cpp | 5 +++++ toolchain/check/handle_class.cpp | 3 +++ toolchain/check/handle_function.cpp | 3 +++ toolchain/check/handle_impl.cpp | 3 +++ toolchain/check/handle_interface.cpp | 2 ++ toolchain/check/handle_let_and_var.cpp | 2 ++ toolchain/check/handle_literal.cpp | 2 ++ toolchain/check/impl_lookup.cpp | 1 + toolchain/check/import.cpp | 3 +++ toolchain/check/import_cpp.cpp | 2 ++ toolchain/check/import_ref.cpp | 5 +++++ toolchain/check/interface.cpp | 3 +++ toolchain/check/modifiers.cpp | 2 ++ toolchain/check/name_lookup.cpp | 2 ++ toolchain/check/node_id_traversal.cpp | 4 ++++ toolchain/check/pattern_match.cpp | 1 + toolchain/check/scope_stack.cpp | 2 ++ toolchain/codegen/codegen.cpp | 2 ++ toolchain/diagnostics/mocks.cpp | 2 ++ toolchain/driver/clang_runner.cpp | 2 ++ toolchain/driver/clang_runner_test.cpp | 1 + toolchain/driver/clang_subcommand.cpp | 2 ++ toolchain/driver/compile_benchmark.cpp | 1 + toolchain/driver/compile_subcommand.cpp | 7 +++++++ toolchain/driver/driver_test.cpp | 2 ++ toolchain/driver/lld_runner.cpp | 1 + toolchain/driver/lld_runner_test.cpp | 2 ++ toolchain/driver/lld_subcommand.cpp | 2 ++ toolchain/driver/llvm_runner.cpp | 1 + toolchain/driver/llvm_runner_test.cpp | 2 ++ toolchain/driver/tool_runner_base.cpp | 2 ++ toolchain/install/busybox_info_test.cpp | 2 ++ toolchain/install/busybox_main.cpp | 1 + toolchain/install/install_paths.cpp | 1 + toolchain/install/install_paths_test.cpp | 3 +++ toolchain/install/install_paths_test_helpers.cpp | 3 +++ toolchain/language_server/context.cpp | 2 ++ toolchain/language_server/handle_document_symbol.cpp | 3 +++ toolchain/language_server/handle_initialize.cpp | 2 ++ toolchain/language_server/handle_shutdown.cpp | 2 ++ toolchain/language_server/handle_text_document.cpp | 4 ++++ toolchain/language_server/incoming_messages.cpp | 2 ++ toolchain/language_server/language_server.cpp | 2 ++ toolchain/lex/dump.cpp | 2 ++ toolchain/lex/lex.cpp | 2 ++ toolchain/lex/numeric_literal.cpp | 3 +++ toolchain/lex/numeric_literal_test.cpp | 3 +++ toolchain/lex/string_literal.cpp | 3 +++ toolchain/lex/string_literal_benchmark.cpp | 3 +++ toolchain/lex/string_literal_test.cpp | 4 ++++ toolchain/lex/tokenized_buffer.cpp | 3 +++ toolchain/lex/tokenized_buffer_benchmark.cpp | 2 ++ toolchain/lex/tokenized_buffer_test.cpp | 2 ++ toolchain/lower/file_context.cpp | 5 +++++ toolchain/lower/handle_call.cpp | 3 +++ toolchain/lower/lower.cpp | 3 +++ toolchain/lower/mangler.cpp | 2 ++ toolchain/parse/context.cpp | 1 + toolchain/parse/dump.cpp | 2 ++ toolchain/parse/extract.cpp | 2 ++ toolchain/parse/handle_decl_scope_loop.cpp | 2 ++ toolchain/parse/handle_paren_condition.cpp | 2 ++ toolchain/parse/handle_statement.cpp | 2 ++ toolchain/parse/precedence.cpp | 3 +++ toolchain/parse/tree_and_subtrees.cpp | 3 +++ toolchain/parse/tree_test.cpp | 2 ++ toolchain/sem_ir/dump.cpp | 2 ++ toolchain/sem_ir/facet_type_info.cpp | 2 ++ toolchain/sem_ir/file.cpp | 4 ++++ toolchain/sem_ir/formatter.cpp | 3 +++ toolchain/sem_ir/function.cpp | 2 ++ toolchain/sem_ir/ids_test.cpp | 1 + toolchain/sem_ir/inst.cpp | 2 ++ toolchain/sem_ir/inst_fingerprinter.cpp | 2 ++ toolchain/sem_ir/inst_namer.cpp | 4 ++++ toolchain/sem_ir/name_scope.cpp | 3 +++ toolchain/sem_ir/stringify.cpp | 5 +++++ toolchain/sem_ir/type.cpp | 2 ++ toolchain/sem_ir/type_info.cpp | 2 ++ toolchain/source/source_buffer.cpp | 2 ++ toolchain/testing/compile_helper.cpp | 3 +++ toolchain/testing/file_test.cpp | 2 ++ toolchain/testing/yaml_test_helpers.cpp | 7 +++++++ 122 files changed, 302 insertions(+) diff --git a/common/check_internal.cpp b/common/check_internal.cpp index 3beeed25b2e6..ea744b3269e5 100644 --- a/common/check_internal.cpp +++ b/common/check_internal.cpp @@ -4,6 +4,9 @@ #include "common/check_internal.h" +#include +#include + #include "common/ostream.h" #include "llvm/Support/Signals.h" diff --git a/common/command_line.cpp b/common/command_line.cpp index ee2bc932e92f..fd6eede5770c 100644 --- a/common/command_line.cpp +++ b/common/command_line.cpp @@ -4,7 +4,11 @@ #include "common/command_line.h" +#include #include +#include +#include +#include #include "common/raw_string_ostream.h" #include "llvm/ADT/DenseMap.h" diff --git a/common/exe_path.cpp b/common/exe_path.cpp index bd81dc7f9660..4812f2fd42c8 100644 --- a/common/exe_path.cpp +++ b/common/exe_path.cpp @@ -4,6 +4,9 @@ #include "common/exe_path.h" +#include +#include + #include "llvm/ADT/StringRef.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Program.h" diff --git a/common/exe_path_test.cpp b/common/exe_path_test.cpp index 32781b24c93a..0be5080f6a2f 100644 --- a/common/exe_path_test.cpp +++ b/common/exe_path_test.cpp @@ -6,6 +6,9 @@ #include +#include +#include + #include "llvm/ADT/SmallString.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" diff --git a/common/hashing.cpp b/common/hashing.cpp index 2a15c8675056..e7bb1da4042c 100644 --- a/common/hashing.cpp +++ b/common/hashing.cpp @@ -4,6 +4,8 @@ #include "common/hashing.h" +#include + namespace Carbon { auto Hasher::HashSizedBytesLarge(llvm::ArrayRef bytes) -> void { diff --git a/common/hashing_benchmark.cpp b/common/hashing_benchmark.cpp index 9a1b2f1a61ec..144bdc590cf6 100644 --- a/common/hashing_benchmark.cpp +++ b/common/hashing_benchmark.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/common/hashing_test.cpp b/common/hashing_test.cpp index 94f615584d66..68c42ba1475b 100644 --- a/common/hashing_test.cpp +++ b/common/hashing_test.cpp @@ -8,7 +8,10 @@ #include #include +#include +#include #include +#include #include "common/raw_string_ostream.h" #include "llvm/ADT/Sequence.h" diff --git a/common/raw_hashtable.cpp b/common/raw_hashtable.cpp index d204ac5df30c..25e2efd3e466 100644 --- a/common/raw_hashtable.cpp +++ b/common/raw_hashtable.cpp @@ -4,6 +4,8 @@ #include "common/raw_hashtable.h" +#include + namespace Carbon::RawHashtable { volatile std::byte global_addr_seed{1}; diff --git a/common/raw_hashtable_benchmark_helpers.cpp b/common/raw_hashtable_benchmark_helpers.cpp index 5ba7cd13b653..d421d3fd846f 100644 --- a/common/raw_hashtable_benchmark_helpers.cpp +++ b/common/raw_hashtable_benchmark_helpers.cpp @@ -4,8 +4,11 @@ #include "common/raw_hashtable_benchmark_helpers.h" +#include #include #include +#include +#include namespace Carbon::RawHashtable { diff --git a/common/raw_hashtable_metadata_group_benchmark.cpp b/common/raw_hashtable_metadata_group_benchmark.cpp index a6942992ef1f..dcd57bafe29b 100644 --- a/common/raw_hashtable_metadata_group_benchmark.cpp +++ b/common/raw_hashtable_metadata_group_benchmark.cpp @@ -5,6 +5,8 @@ #include #include +#include +#include #include "absl/random/random.h" #include "common/raw_hashtable_metadata_group.h" diff --git a/common/set_benchmark.cpp b/common/set_benchmark.cpp index e3b4a36e5af7..454332f544fd 100644 --- a/common/set_benchmark.cpp +++ b/common/set_benchmark.cpp @@ -4,6 +4,8 @@ #include +#include + #include "absl/container/flat_hash_set.h" #include "common/raw_hashtable_benchmark_helpers.h" #include "common/set.h" diff --git a/common/string_helpers.cpp b/common/string_helpers.cpp index 56950d5a3983..b6497a6e13d3 100644 --- a/common/string_helpers.cpp +++ b/common/string_helpers.cpp @@ -6,6 +6,7 @@ #include #include +#include #include "common/check.h" #include "llvm/ADT/StringExtras.h" diff --git a/common/string_helpers_test.cpp b/common/string_helpers_test.cpp index 4e5c5871f0a1..fefd494152fb 100644 --- a/common/string_helpers_test.cpp +++ b/common/string_helpers_test.cpp @@ -7,6 +7,7 @@ #include #include +#include #include using ::testing::Eq; diff --git a/common/vlog_test.cpp b/common/vlog_test.cpp index 648a17211d5d..ba920159570d 100644 --- a/common/vlog_test.cpp +++ b/common/vlog_test.cpp @@ -7,6 +7,8 @@ #include #include +#include + #include "common/raw_string_ostream.h" namespace Carbon::Testing { diff --git a/testing/base/capture_std_streams.cpp b/testing/base/capture_std_streams.cpp index f7e5b75a9e6b..e35c3098b038 100644 --- a/testing/base/capture_std_streams.cpp +++ b/testing/base/capture_std_streams.cpp @@ -8,6 +8,7 @@ #include #include +#include #include "common/ostream.h" diff --git a/testing/base/file_helpers.cpp b/testing/base/file_helpers.cpp index b9683229d4dc..5246625b0d49 100644 --- a/testing/base/file_helpers.cpp +++ b/testing/base/file_helpers.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Carbon::Testing { diff --git a/testing/base/global_exe_path.cpp b/testing/base/global_exe_path.cpp index 1a0349e7156f..faf967d28c22 100644 --- a/testing/base/global_exe_path.cpp +++ b/testing/base/global_exe_path.cpp @@ -4,6 +4,7 @@ #include "testing/base/global_exe_path.h" +#include #include #include "common/check.h" diff --git a/testing/base/source_gen.cpp b/testing/base/source_gen.cpp index 8678786415df..c50b7085f536 100644 --- a/testing/base/source_gen.cpp +++ b/testing/base/source_gen.cpp @@ -4,7 +4,11 @@ #include "testing/base/source_gen.h" +#include +#include #include +#include +#include #include "common/raw_string_ostream.h" #include "llvm/ADT/ArrayRef.h" diff --git a/testing/base/source_gen_main.cpp b/testing/base/source_gen_main.cpp index 33b24cda3b8d..f72c56c4a7cd 100644 --- a/testing/base/source_gen_main.cpp +++ b/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 +#include + #include "common/bazel_working_dir.h" #include "common/command_line.h" #include "common/init_llvm.h" diff --git a/testing/base/source_gen_test.cpp b/testing/base/source_gen_test.cpp index 3ad71fd50d62..1cd22c576b58 100644 --- a/testing/base/source_gen_test.cpp +++ b/testing/base/source_gen_test.cpp @@ -7,6 +7,8 @@ #include #include +#include + #include "common/set.h" #include "testing/base/global_exe_path.h" #include "toolchain/driver/driver.h" diff --git a/testing/file_test/autoupdate.cpp b/testing/file_test/autoupdate.cpp index 142775c52870..da9028c846af 100644 --- a/testing/file_test/autoupdate.cpp +++ b/testing/file_test/autoupdate.cpp @@ -5,6 +5,8 @@ #include "testing/file_test/autoupdate.h" #include +#include +#include #include "absl/strings/str_replace.h" #include "absl/strings/string_view.h" diff --git a/testing/file_test/file_test_base.cpp b/testing/file_test/file_test_base.cpp index 51b8fe8515ea..c2900d983799 100644 --- a/testing/file_test/file_test_base.cpp +++ b/testing/file_test/file_test_base.cpp @@ -21,9 +21,16 @@ #include "testing/file_test/file_test_base.h" +#include +#include #include +#include +#include +#include #include #include +#include +#include #include #include "absl/flags/flag.h" diff --git a/testing/file_test/file_test_base_test.cpp b/testing/file_test/file_test_base_test.cpp index b83b4cd4d017..2420c7fd1026 100644 --- a/testing/file_test/file_test_base_test.cpp +++ b/testing/file_test/file_test_base_test.cpp @@ -7,6 +7,11 @@ #include #include +#include +#include +#include +#include + #include "common/ostream.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSwitch.h" diff --git a/testing/file_test/manifest.cpp b/testing/file_test/manifest.cpp index d71281344dbd..a2ad6cd1bbc0 100644 --- a/testing/file_test/manifest.cpp +++ b/testing/file_test/manifest.cpp @@ -4,6 +4,8 @@ #include "testing/file_test/manifest.h" +#include + // The test manifest, produced by `manifest_as_cpp`. // NOLINTNEXTLINE(readability-identifier-naming): Constant in practice. extern const char* CarbonFileTestManifest[]; diff --git a/testing/file_test/run_test.cpp b/testing/file_test/run_test.cpp index db987fe5d1a7..66d7cf4782c1 100644 --- a/testing/file_test/run_test.cpp +++ b/testing/file_test/run_test.cpp @@ -6,6 +6,9 @@ #include +#include +#include + #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringMap.h" diff --git a/testing/file_test/test_file.cpp b/testing/file_test/test_file.cpp index 3875853a9bd4..92cacf4178d9 100644 --- a/testing/file_test/test_file.cpp +++ b/testing/file_test/test_file.cpp @@ -5,6 +5,9 @@ #include "testing/file_test/test_file.h" #include +#include +#include +#include #include "common/check.h" #include "common/error.h" diff --git a/toolchain/base/int.cpp b/toolchain/base/int.cpp index 4c5f9d3cf349..6d292b7444be 100644 --- a/toolchain/base/int.cpp +++ b/toolchain/base/int.cpp @@ -4,6 +4,9 @@ #include "toolchain/base/int.h" +#include +#include + namespace Carbon { auto IntStore::CanonicalBitWidth(int significant_bits) -> int { diff --git a/toolchain/base/int_test.cpp b/toolchain/base/int_test.cpp index 3c2f2f6d4e8d..d7a47cf4236e 100644 --- a/toolchain/base/int_test.cpp +++ b/toolchain/base/int_test.cpp @@ -7,6 +7,7 @@ #include #include +#include #include namespace Carbon::Testing { diff --git a/toolchain/base/value_store_test.cpp b/toolchain/base/value_store_test.cpp index 41f46ada893e..fc007065a2b7 100644 --- a/toolchain/base/value_store_test.cpp +++ b/toolchain/base/value_store_test.cpp @@ -7,6 +7,8 @@ #include #include +#include + #include "toolchain/base/value_ids.h" namespace Carbon::Testing { diff --git a/toolchain/check/call.cpp b/toolchain/check/call.cpp index 6306f7359a39..6b4d88f4c216 100644 --- a/toolchain/check/call.cpp +++ b/toolchain/check/call.cpp @@ -4,6 +4,8 @@ #include "toolchain/check/call.h" +#include + #include "toolchain/base/kind_switch.h" #include "toolchain/check/context.h" #include "toolchain/check/control_flow.h" diff --git a/toolchain/check/check.cpp b/toolchain/check/check.cpp index 3c7c434fc6f7..57d0b259bf9e 100644 --- a/toolchain/check/check.cpp +++ b/toolchain/check/check.cpp @@ -4,6 +4,9 @@ #include "toolchain/check/check.h" +#include +#include + #include "common/check.h" #include "common/map.h" #include "toolchain/check/check_unit.h" diff --git a/toolchain/check/check_unit.cpp b/toolchain/check/check_unit.cpp index c3d68d40ab71..fdd1b80b6834 100644 --- a/toolchain/check/check_unit.cpp +++ b/toolchain/check/check_unit.cpp @@ -5,6 +5,7 @@ #include "toolchain/check/check_unit.h" #include +#include #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/StringRef.h" diff --git a/toolchain/check/context.cpp b/toolchain/check/context.cpp index 3df7d905c8e5..bf3f88d1bf3f 100644 --- a/toolchain/check/context.cpp +++ b/toolchain/check/context.cpp @@ -4,6 +4,9 @@ #include "toolchain/check/context.h" +#include +#include + #include "common/check.h" namespace Carbon::Check { diff --git a/toolchain/check/control_flow.cpp b/toolchain/check/control_flow.cpp index 2a38b56cd187..d92e67ad96ad 100644 --- a/toolchain/check/control_flow.cpp +++ b/toolchain/check/control_flow.cpp @@ -4,6 +4,8 @@ #include "toolchain/check/control_flow.h" +#include + #include "toolchain/base/kind_switch.h" #include "toolchain/check/call.h" #include "toolchain/check/inst.h" diff --git a/toolchain/check/convert.cpp b/toolchain/check/convert.cpp index 6c943925e938..749fe5eab7ee 100644 --- a/toolchain/check/convert.cpp +++ b/toolchain/check/convert.cpp @@ -4,6 +4,7 @@ #include "toolchain/check/convert.h" +#include #include #include diff --git a/toolchain/check/decl_name_stack.cpp b/toolchain/check/decl_name_stack.cpp index 364c2e444b8a..824ee67c90c2 100644 --- a/toolchain/check/decl_name_stack.cpp +++ b/toolchain/check/decl_name_stack.cpp @@ -4,6 +4,8 @@ #include "toolchain/check/decl_name_stack.h" +#include + #include "toolchain/base/kind_switch.h" #include "toolchain/check/context.h" #include "toolchain/check/diagnostic_helpers.h" diff --git a/toolchain/check/deferred_definition_worklist.cpp b/toolchain/check/deferred_definition_worklist.cpp index b914b0976d06..8259a4545c83 100644 --- a/toolchain/check/deferred_definition_worklist.cpp +++ b/toolchain/check/deferred_definition_worklist.cpp @@ -4,6 +4,9 @@ #include "toolchain/check/deferred_definition_worklist.h" +#include +#include + #include "common/variant_helpers.h" #include "common/vlog.h" #include "toolchain/check/handle.h" diff --git a/toolchain/check/diagnostic_emitter.cpp b/toolchain/check/diagnostic_emitter.cpp index 40e58a67d7f3..38c66365e151 100644 --- a/toolchain/check/diagnostic_emitter.cpp +++ b/toolchain/check/diagnostic_emitter.cpp @@ -4,6 +4,9 @@ #include "toolchain/check/diagnostic_emitter.h" +#include +#include + #include "common/raw_string_ostream.h" #include "toolchain/sem_ir/absolute_node_id.h" #include "toolchain/sem_ir/stringify.h" diff --git a/toolchain/check/dump.cpp b/toolchain/check/dump.cpp index 69ab3193f06b..6e79c53a6b3f 100644 --- a/toolchain/check/dump.cpp +++ b/toolchain/check/dump.cpp @@ -15,6 +15,8 @@ #include "toolchain/lex/dump.h" +#include + #include "common/check.h" #include "common/raw_string_ostream.h" #include "toolchain/check/context.h" diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index 4765cb0f0b29..6b836c23ab53 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -4,6 +4,11 @@ #include "toolchain/check/eval.h" +#include +#include +#include +#include + #include "toolchain/base/kind_switch.h" #include "toolchain/check/action.h" #include "toolchain/check/diagnostic_helpers.h" diff --git a/toolchain/check/handle_class.cpp b/toolchain/check/handle_class.cpp index 98ce2ea50ea5..c846595a2201 100644 --- a/toolchain/check/handle_class.cpp +++ b/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 +#include + #include "toolchain/base/kind_switch.h" #include "toolchain/check/class.h" #include "toolchain/check/context.h" diff --git a/toolchain/check/handle_function.cpp b/toolchain/check/handle_function.cpp index d2ddccfaf5b8..caeaf33a4d67 100644 --- a/toolchain/check/handle_function.cpp +++ b/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 +#include + #include "toolchain/base/kind_switch.h" #include "toolchain/check/context.h" #include "toolchain/check/control_flow.h" diff --git a/toolchain/check/handle_impl.cpp b/toolchain/check/handle_impl.cpp index 587b56519851..c98006cd32ef 100644 --- a/toolchain/check/handle_impl.cpp +++ b/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 +#include + #include "toolchain/check/context.h" #include "toolchain/check/convert.h" #include "toolchain/check/decl_name_stack.h" diff --git a/toolchain/check/handle_interface.cpp b/toolchain/check/handle_interface.cpp index 3b7701a73944..b349ac17e59e 100644 --- a/toolchain/check/handle_interface.cpp +++ b/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 + #include "toolchain/check/context.h" #include "toolchain/check/eval.h" #include "toolchain/check/facet_type.h" diff --git a/toolchain/check/handle_let_and_var.cpp b/toolchain/check/handle_let_and_var.cpp index ffd002e6a66a..8ae52472d29b 100644 --- a/toolchain/check/handle_let_and_var.cpp +++ b/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 + #include "toolchain/check/context.h" #include "toolchain/check/control_flow.h" #include "toolchain/check/convert.h" diff --git a/toolchain/check/handle_literal.cpp b/toolchain/check/handle_literal.cpp index 4ecba66285ea..9f3bf1e52988 100644 --- a/toolchain/check/handle_literal.cpp +++ b/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 + #include "toolchain/check/call.h" #include "toolchain/check/context.h" #include "toolchain/check/handle.h" diff --git a/toolchain/check/impl_lookup.cpp b/toolchain/check/impl_lookup.cpp index ea55b3a0fa12..73519de20c9a 100644 --- a/toolchain/check/impl_lookup.cpp +++ b/toolchain/check/impl_lookup.cpp @@ -5,6 +5,7 @@ #include "toolchain/check/impl_lookup.h" #include +#include #include #include "toolchain/base/kind_switch.h" diff --git a/toolchain/check/import.cpp b/toolchain/check/import.cpp index e5c20647909d..ad4092857cf6 100644 --- a/toolchain/check/import.cpp +++ b/toolchain/check/import.cpp @@ -4,6 +4,9 @@ #include "toolchain/check/import.h" +#include +#include + #include "common/check.h" #include "common/map.h" #include "toolchain/base/kind_switch.h" diff --git a/toolchain/check/import_cpp.cpp b/toolchain/check/import_cpp.cpp index bb88ac1e4f52..e747b197840a 100644 --- a/toolchain/check/import_cpp.cpp +++ b/toolchain/check/import_cpp.cpp @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include "clang/Frontend/TextDiagnostic.h" #include "clang/Sema/Lookup.h" diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index 4f0fba2a5480..a134f2d23581 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -4,6 +4,11 @@ #include "toolchain/check/import_ref.h" +#include +#include +#include +#include + #include "common/check.h" #include "toolchain/base/kind_switch.h" #include "toolchain/check/context.h" diff --git a/toolchain/check/interface.cpp b/toolchain/check/interface.cpp index 49663ae9a2fa..cbd041d764c7 100644 --- a/toolchain/check/interface.cpp +++ b/toolchain/check/interface.cpp @@ -4,6 +4,9 @@ #include "toolchain/check/interface.h" +#include +#include + #include "toolchain/check/context.h" #include "toolchain/check/eval.h" #include "toolchain/check/generic.h" diff --git a/toolchain/check/modifiers.cpp b/toolchain/check/modifiers.cpp index 668de98cb930..0312ca45975a 100644 --- a/toolchain/check/modifiers.cpp +++ b/toolchain/check/modifiers.cpp @@ -4,6 +4,8 @@ #include "toolchain/check/modifiers.h" +#include + #include "toolchain/check/decl_introducer_state.h" namespace Carbon::Check { diff --git a/toolchain/check/name_lookup.cpp b/toolchain/check/name_lookup.cpp index 620f1aa43e0b..b94441344bac 100644 --- a/toolchain/check/name_lookup.cpp +++ b/toolchain/check/name_lookup.cpp @@ -4,6 +4,8 @@ #include "toolchain/check/name_lookup.h" +#include + #include "toolchain/check/generic.h" #include "toolchain/check/import.h" #include "toolchain/check/import_cpp.h" diff --git a/toolchain/check/node_id_traversal.cpp b/toolchain/check/node_id_traversal.cpp index 244fe642e0c8..de44c93249d5 100644 --- a/toolchain/check/node_id_traversal.cpp +++ b/toolchain/check/node_id_traversal.cpp @@ -4,6 +4,10 @@ #include "toolchain/check/node_id_traversal.h" +#include +#include +#include + #include "toolchain/check/handle.h" namespace Carbon::Check { diff --git a/toolchain/check/pattern_match.cpp b/toolchain/check/pattern_match.cpp index 54040e54b808..8da0ea9db6fc 100644 --- a/toolchain/check/pattern_match.cpp +++ b/toolchain/check/pattern_match.cpp @@ -5,6 +5,7 @@ #include "toolchain/check/pattern_match.h" #include +#include #include #include "llvm/ADT/STLExtras.h" diff --git a/toolchain/check/scope_stack.cpp b/toolchain/check/scope_stack.cpp index 5b5903f56cc7..3de37a86d52c 100644 --- a/toolchain/check/scope_stack.cpp +++ b/toolchain/check/scope_stack.cpp @@ -4,6 +4,8 @@ #include "toolchain/check/scope_stack.h" +#include + #include "common/check.h" #include "toolchain/sem_ir/ids.h" diff --git a/toolchain/codegen/codegen.cpp b/toolchain/codegen/codegen.cpp index 627adaf64fa7..43f3e2ac65b0 100644 --- a/toolchain/codegen/codegen.cpp +++ b/toolchain/codegen/codegen.cpp @@ -5,6 +5,8 @@ #include "toolchain/codegen/codegen.h" #include +#include +#include #include "llvm/IR/LegacyPassManager.h" #include "llvm/MC/TargetRegistry.h" diff --git a/toolchain/diagnostics/mocks.cpp b/toolchain/diagnostics/mocks.cpp index 7ce6830b1502..1123f4ee2d35 100644 --- a/toolchain/diagnostics/mocks.cpp +++ b/toolchain/diagnostics/mocks.cpp @@ -4,6 +4,8 @@ #include "toolchain/diagnostics/mocks.h" +#include + namespace Carbon::Diagnostics { auto PrintTo(const Diagnostic& diagnostic, std::ostream* os) -> void { diff --git a/toolchain/driver/clang_runner.cpp b/toolchain/driver/clang_runner.cpp index ca05bd530744..2cd32a84c457 100644 --- a/toolchain/driver/clang_runner.cpp +++ b/toolchain/driver/clang_runner.cpp @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticOptions.h" diff --git a/toolchain/driver/clang_runner_test.cpp b/toolchain/driver/clang_runner_test.cpp index ac556b507dd5..b2ab6e72e6ec 100644 --- a/toolchain/driver/clang_runner_test.cpp +++ b/toolchain/driver/clang_runner_test.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include "common/check.h" diff --git a/toolchain/driver/clang_subcommand.cpp b/toolchain/driver/clang_subcommand.cpp index 4e663568f448..6911cc75f33f 100644 --- a/toolchain/driver/clang_subcommand.cpp +++ b/toolchain/driver/clang_subcommand.cpp @@ -4,6 +4,8 @@ #include "toolchain/driver/clang_subcommand.h" +#include + #include "llvm/TargetParser/Host.h" #include "toolchain/driver/clang_runner.h" diff --git a/toolchain/driver/compile_benchmark.cpp b/toolchain/driver/compile_benchmark.cpp index 311669befc70..b26604f1acd1 100644 --- a/toolchain/driver/compile_benchmark.cpp +++ b/toolchain/driver/compile_benchmark.cpp @@ -4,6 +4,7 @@ #include +#include #include #include "testing/base/global_exe_path.h" diff --git a/toolchain/driver/compile_subcommand.cpp b/toolchain/driver/compile_subcommand.cpp index 775f29ece11d..a4eb7719f9f7 100644 --- a/toolchain/driver/compile_subcommand.cpp +++ b/toolchain/driver/compile_subcommand.cpp @@ -4,6 +4,13 @@ #include "toolchain/driver/compile_subcommand.h" +#include +#include +#include +#include +#include +#include + #include "common/vlog.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/ScopeExit.h" diff --git a/toolchain/driver/driver_test.cpp b/toolchain/driver/driver_test.cpp index a4fb3474ff0b..683fd72f94c9 100644 --- a/toolchain/driver/driver_test.cpp +++ b/toolchain/driver/driver_test.cpp @@ -9,6 +9,8 @@ #include #include +#include +#include #include #include "common/raw_string_ostream.h" diff --git a/toolchain/driver/lld_runner.cpp b/toolchain/driver/lld_runner.cpp index 8386cd516670..528bdb24fb88 100644 --- a/toolchain/driver/lld_runner.cpp +++ b/toolchain/driver/lld_runner.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include "common/vlog.h" #include "llvm/ADT/ArrayRef.h" diff --git a/toolchain/driver/lld_runner_test.cpp b/toolchain/driver/lld_runner_test.cpp index fc26f5a17235..539bd22ce492 100644 --- a/toolchain/driver/lld_runner_test.cpp +++ b/toolchain/driver/lld_runner_test.cpp @@ -9,6 +9,8 @@ #include #include +#include +#include #include #include "common/check.h" diff --git a/toolchain/driver/lld_subcommand.cpp b/toolchain/driver/lld_subcommand.cpp index f397ec4a6a2d..00d9f8419b3d 100644 --- a/toolchain/driver/lld_subcommand.cpp +++ b/toolchain/driver/lld_subcommand.cpp @@ -4,6 +4,8 @@ #include "toolchain/driver/lld_subcommand.h" +#include + #include "llvm/TargetParser/Host.h" #include "llvm/TargetParser/Triple.h" #include "toolchain/driver/lld_runner.h" diff --git a/toolchain/driver/llvm_runner.cpp b/toolchain/driver/llvm_runner.cpp index 0f9c290b500e..c3465c61b917 100644 --- a/toolchain/driver/llvm_runner.cpp +++ b/toolchain/driver/llvm_runner.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include "common/vlog.h" #include "lld/Common/Driver.h" diff --git a/toolchain/driver/llvm_runner_test.cpp b/toolchain/driver/llvm_runner_test.cpp index c93a5ed2af54..d15b90d20f42 100644 --- a/toolchain/driver/llvm_runner_test.cpp +++ b/toolchain/driver/llvm_runner_test.cpp @@ -7,6 +7,8 @@ #include #include +#include + #include "common/ostream.h" #include "common/raw_string_ostream.h" #include "llvm/ADT/ScopeExit.h" diff --git a/toolchain/driver/tool_runner_base.cpp b/toolchain/driver/tool_runner_base.cpp index a3455ed546bb..3b9eec88ba63 100644 --- a/toolchain/driver/tool_runner_base.cpp +++ b/toolchain/driver/tool_runner_base.cpp @@ -4,7 +4,9 @@ #include "toolchain/driver/tool_runner_base.h" +#include #include +#include #include "common/vlog.h" #include "llvm/ADT/ArrayRef.h" diff --git a/toolchain/install/busybox_info_test.cpp b/toolchain/install/busybox_info_test.cpp index 14ca16653aaf..dd8010c73815 100644 --- a/toolchain/install/busybox_info_test.cpp +++ b/toolchain/install/busybox_info_test.cpp @@ -9,6 +9,8 @@ #include #include +#include +#include #include "common/check.h" #include "llvm/ADT/ScopeExit.h" diff --git a/toolchain/install/busybox_main.cpp b/toolchain/install/busybox_main.cpp index 3b9a3ed66dee..5986369dab08 100644 --- a/toolchain/install/busybox_main.cpp +++ b/toolchain/install/busybox_main.cpp @@ -5,6 +5,7 @@ #include #include +#include #include "common/bazel_working_dir.h" #include "common/error.h" diff --git a/toolchain/install/install_paths.cpp b/toolchain/install/install_paths.cpp index ba24331caa54..0bd18db6e266 100644 --- a/toolchain/install/install_paths.cpp +++ b/toolchain/install/install_paths.cpp @@ -5,6 +5,7 @@ #include "toolchain/install/install_paths.h" #include +#include #include "common/check.h" #include "llvm/ADT/StringExtras.h" diff --git a/toolchain/install/install_paths_test.cpp b/toolchain/install/install_paths_test.cpp index cedcf2019ca5..fac9f0af6024 100644 --- a/toolchain/install/install_paths_test.cpp +++ b/toolchain/install/install_paths_test.cpp @@ -7,6 +7,9 @@ #include #include +#include +#include + #include "common/check.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/FileSystem.h" diff --git a/toolchain/install/install_paths_test_helpers.cpp b/toolchain/install/install_paths_test_helpers.cpp index ef4b968ef8ab..a963cda5bb74 100644 --- a/toolchain/install/install_paths_test_helpers.cpp +++ b/toolchain/install/install_paths_test_helpers.cpp @@ -4,6 +4,9 @@ #include "toolchain/install/install_paths_test_helpers.h" +#include +#include + #include "testing/base/global_exe_path.h" namespace Carbon::Testing { diff --git a/toolchain/language_server/context.cpp b/toolchain/language_server/context.cpp index f02845a22190..d47732e6b88a 100644 --- a/toolchain/language_server/context.cpp +++ b/toolchain/language_server/context.cpp @@ -5,6 +5,8 @@ #include "toolchain/language_server/context.h" #include +#include +#include #include "common/check.h" #include "common/raw_string_ostream.h" diff --git a/toolchain/language_server/handle_document_symbol.cpp b/toolchain/language_server/handle_document_symbol.cpp index 65c2708af4d6..f532978f79f0 100644 --- a/toolchain/language_server/handle_document_symbol.cpp +++ b/toolchain/language_server/handle_document_symbol.cpp @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include +#include +#include +#include #include "common/check.h" #include "toolchain/language_server/handle.h" diff --git a/toolchain/language_server/handle_initialize.cpp b/toolchain/language_server/handle_initialize.cpp index 3516e1329fe1..bf74c3597b43 100644 --- a/toolchain/language_server/handle_initialize.cpp +++ b/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 + #include "toolchain/language_server/handle.h" namespace Carbon::LanguageServer { diff --git a/toolchain/language_server/handle_shutdown.cpp b/toolchain/language_server/handle_shutdown.cpp index 64d78dbd8b56..864837fe2201 100644 --- a/toolchain/language_server/handle_shutdown.cpp +++ b/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 + #include "toolchain/language_server/handle.h" namespace Carbon::LanguageServer { diff --git a/toolchain/language_server/handle_text_document.cpp b/toolchain/language_server/handle_text_document.cpp index ea59770765c4..2d5a5e0fafe9 100644 --- a/toolchain/language_server/handle_text_document.cpp +++ b/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 +#include +#include + #include "toolchain/language_server/handle.h" namespace Carbon::LanguageServer { diff --git a/toolchain/language_server/incoming_messages.cpp b/toolchain/language_server/incoming_messages.cpp index 219da3b9e1b1..80397a501bc2 100644 --- a/toolchain/language_server/incoming_messages.cpp +++ b/toolchain/language_server/incoming_messages.cpp @@ -4,6 +4,8 @@ #include "toolchain/language_server/incoming_messages.h" +#include + #include "common/ostream.h" #include "common/raw_string_ostream.h" #include "toolchain/language_server/handle.h" diff --git a/toolchain/language_server/language_server.cpp b/toolchain/language_server/language_server.cpp index 8486b58a4d68..b40d11621745 100644 --- a/toolchain/language_server/language_server.cpp +++ b/toolchain/language_server/language_server.cpp @@ -4,6 +4,8 @@ #include "toolchain/language_server/language_server.h" +#include + #include "clang-tools-extra/clangd/LSPBinder.h" #include "clang-tools-extra/clangd/Transport.h" #include "clang-tools-extra/clangd/support/Logger.h" diff --git a/toolchain/lex/dump.cpp b/toolchain/lex/dump.cpp index a38eced70458..ebb6d8616214 100644 --- a/toolchain/lex/dump.cpp +++ b/toolchain/lex/dump.cpp @@ -6,6 +6,8 @@ #include "toolchain/lex/dump.h" +#include + #include "common/raw_string_ostream.h" namespace Carbon::Lex { diff --git a/toolchain/lex/lex.cpp b/toolchain/lex/lex.cpp index 8e9c31a4ee01..91bbe0aea372 100644 --- a/toolchain/lex/lex.cpp +++ b/toolchain/lex/lex.cpp @@ -6,6 +6,8 @@ #include #include +#include +#include #include "common/check.h" #include "common/variant_helpers.h" diff --git a/toolchain/lex/numeric_literal.cpp b/toolchain/lex/numeric_literal.cpp index a7379cb0c32d..a5b0828603b2 100644 --- a/toolchain/lex/numeric_literal.cpp +++ b/toolchain/lex/numeric_literal.cpp @@ -4,7 +4,10 @@ #include "toolchain/lex/numeric_literal.h" +#include #include +#include +#include #include "common/check.h" #include "llvm/ADT/StringExtras.h" diff --git a/toolchain/lex/numeric_literal_test.cpp b/toolchain/lex/numeric_literal_test.cpp index 41a4ed86556e..054f088e5d26 100644 --- a/toolchain/lex/numeric_literal_test.cpp +++ b/toolchain/lex/numeric_literal_test.cpp @@ -7,6 +7,9 @@ #include #include +#include +#include + #include "common/check.h" #include "toolchain/diagnostics/diagnostic_emitter.h" #include "toolchain/lex/test_helpers.h" diff --git a/toolchain/lex/string_literal.cpp b/toolchain/lex/string_literal.cpp index 2c4398f9744b..e64573d2e08a 100644 --- a/toolchain/lex/string_literal.cpp +++ b/toolchain/lex/string_literal.cpp @@ -4,6 +4,9 @@ #include "toolchain/lex/string_literal.h" +#include +#include + #include "common/check.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringExtras.h" diff --git a/toolchain/lex/string_literal_benchmark.cpp b/toolchain/lex/string_literal_benchmark.cpp index a48480f1083d..fd7b2b3f2969 100644 --- a/toolchain/lex/string_literal_benchmark.cpp +++ b/toolchain/lex/string_literal_benchmark.cpp @@ -4,6 +4,9 @@ #include +#include +#include + #include "toolchain/diagnostics/null_diagnostics.h" #include "toolchain/lex/string_literal.h" diff --git a/toolchain/lex/string_literal_test.cpp b/toolchain/lex/string_literal_test.cpp index fe6f5cbeeddf..5da2600757dc 100644 --- a/toolchain/lex/string_literal_test.cpp +++ b/toolchain/lex/string_literal_test.cpp @@ -7,6 +7,10 @@ #include #include +#include +#include +#include + #include "common/check.h" #include "toolchain/diagnostics/diagnostic_emitter.h" #include "toolchain/lex/test_helpers.h" diff --git a/toolchain/lex/tokenized_buffer.cpp b/toolchain/lex/tokenized_buffer.cpp index 52c6f5bafc78..6a49128628e8 100644 --- a/toolchain/lex/tokenized_buffer.cpp +++ b/toolchain/lex/tokenized_buffer.cpp @@ -6,6 +6,9 @@ #include #include +#include +#include +#include #include "common/check.h" #include "common/string_helpers.h" diff --git a/toolchain/lex/tokenized_buffer_benchmark.cpp b/toolchain/lex/tokenized_buffer_benchmark.cpp index 022bd0724eea..5a67b5680fce 100644 --- a/toolchain/lex/tokenized_buffer_benchmark.cpp +++ b/toolchain/lex/tokenized_buffer_benchmark.cpp @@ -5,6 +5,8 @@ #include #include +#include +#include #include #include "absl/random/random.h" diff --git a/toolchain/lex/tokenized_buffer_test.cpp b/toolchain/lex/tokenized_buffer_test.cpp index 7fbccbbc56ee..6d241cdf1595 100644 --- a/toolchain/lex/tokenized_buffer_test.cpp +++ b/toolchain/lex/tokenized_buffer_test.cpp @@ -7,9 +7,11 @@ #include #include +#include #include #include #include +#include #include "common/raw_string_ostream.h" #include "llvm/ADT/ArrayRef.h" diff --git a/toolchain/lower/file_context.cpp b/toolchain/lower/file_context.cpp index 6031efe77042..35e06fdb3e21 100644 --- a/toolchain/lower/file_context.cpp +++ b/toolchain/lower/file_context.cpp @@ -4,6 +4,11 @@ #include "toolchain/lower/file_context.h" +#include +#include +#include +#include + #include "common/check.h" #include "common/vlog.h" #include "llvm/ADT/STLExtras.h" diff --git a/toolchain/lower/handle_call.cpp b/toolchain/lower/handle_call.cpp index 5839646d73ab..58425f365d1b 100644 --- a/toolchain/lower/handle_call.cpp +++ b/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 +#include + #include "llvm/IR/Type.h" #include "llvm/IR/Value.h" #include "toolchain/lower/function_context.h" diff --git a/toolchain/lower/lower.cpp b/toolchain/lower/lower.cpp index 5a5afff7fba8..6956d42b0b2f 100644 --- a/toolchain/lower/lower.cpp +++ b/toolchain/lower/lower.cpp @@ -4,6 +4,9 @@ #include "toolchain/lower/lower.h" +#include +#include + #include "toolchain/lower/file_context.h" namespace Carbon::Lower { diff --git a/toolchain/lower/mangler.cpp b/toolchain/lower/mangler.cpp index 1a76dde9bffa..50750e5ed604 100644 --- a/toolchain/lower/mangler.cpp +++ b/toolchain/lower/mangler.cpp @@ -4,6 +4,8 @@ #include "toolchain/lower/mangler.h" +#include + #include "common/raw_string_ostream.h" #include "toolchain/base/kind_switch.h" #include "toolchain/sem_ir/entry_point.h" diff --git a/toolchain/parse/context.cpp b/toolchain/parse/context.cpp index 56dabbfede38..e9a4cebcf7bc 100644 --- a/toolchain/parse/context.cpp +++ b/toolchain/parse/context.cpp @@ -4,6 +4,7 @@ #include "toolchain/parse/context.h" +#include #include #include "common/check.h" diff --git a/toolchain/parse/dump.cpp b/toolchain/parse/dump.cpp index ef3b71e3293c..436f828de458 100644 --- a/toolchain/parse/dump.cpp +++ b/toolchain/parse/dump.cpp @@ -6,6 +6,8 @@ #include "toolchain/parse/dump.h" +#include + #include "common/raw_string_ostream.h" #include "toolchain/lex/dump.h" diff --git a/toolchain/parse/extract.cpp b/toolchain/parse/extract.cpp index ec132bcdd6bd..bd7d68569783 100644 --- a/toolchain/parse/extract.cpp +++ b/toolchain/parse/extract.cpp @@ -2,6 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +#include +#include #include #include #include diff --git a/toolchain/parse/handle_decl_scope_loop.cpp b/toolchain/parse/handle_decl_scope_loop.cpp index cced086f2230..9495b65ae033 100644 --- a/toolchain/parse/handle_decl_scope_loop.cpp +++ b/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 + #include "toolchain/lex/token_kind.h" #include "toolchain/parse/context.h" #include "toolchain/parse/handle.h" diff --git a/toolchain/parse/handle_paren_condition.cpp b/toolchain/parse/handle_paren_condition.cpp index ddc4af06cfb6..40f9ab499011 100644 --- a/toolchain/parse/handle_paren_condition.cpp +++ b/toolchain/parse/handle_paren_condition.cpp @@ -2,6 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +#include + #include "toolchain/parse/context.h" #include "toolchain/parse/handle.h" diff --git a/toolchain/parse/handle_statement.cpp b/toolchain/parse/handle_statement.cpp index 0540766b8bdf..c52373dd9f45 100644 --- a/toolchain/parse/handle_statement.cpp +++ b/toolchain/parse/handle_statement.cpp @@ -2,6 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +#include + #include "toolchain/parse/context.h" #include "toolchain/parse/handle.h" diff --git a/toolchain/parse/precedence.cpp b/toolchain/parse/precedence.cpp index 7500232a5835..7b6eecf49dd1 100644 --- a/toolchain/parse/precedence.cpp +++ b/toolchain/parse/precedence.cpp @@ -4,6 +4,9 @@ #include "toolchain/parse/precedence.h" +#include +#include + #include "common/check.h" namespace Carbon::Parse { diff --git a/toolchain/parse/tree_and_subtrees.cpp b/toolchain/parse/tree_and_subtrees.cpp index 0d93da3fdcef..49887102a0a0 100644 --- a/toolchain/parse/tree_and_subtrees.cpp +++ b/toolchain/parse/tree_and_subtrees.cpp @@ -4,6 +4,9 @@ #include "toolchain/parse/tree_and_subtrees.h" +#include +#include + #include "toolchain/lex/token_index.h" namespace Carbon::Parse { diff --git a/toolchain/parse/tree_test.cpp b/toolchain/parse/tree_test.cpp index d72dc6df82fd..48171fc5e48f 100644 --- a/toolchain/parse/tree_test.cpp +++ b/toolchain/parse/tree_test.cpp @@ -8,6 +8,8 @@ #include #include +#include +#include #include "common/raw_string_ostream.h" #include "toolchain/base/shared_value_stores.h" diff --git a/toolchain/sem_ir/dump.cpp b/toolchain/sem_ir/dump.cpp index d88b22826485..733c798e36e0 100644 --- a/toolchain/sem_ir/dump.cpp +++ b/toolchain/sem_ir/dump.cpp @@ -6,6 +6,8 @@ #include "toolchain/sem_ir/dump.h" +#include + #include "common/raw_string_ostream.h" #include "toolchain/sem_ir/stringify.h" diff --git a/toolchain/sem_ir/facet_type_info.cpp b/toolchain/sem_ir/facet_type_info.cpp index fb5dd8adae1e..47cbc986f071 100644 --- a/toolchain/sem_ir/facet_type_info.cpp +++ b/toolchain/sem_ir/facet_type_info.cpp @@ -4,6 +4,8 @@ #include "toolchain/sem_ir/facet_type_info.h" +#include + namespace Carbon::SemIR { template diff --git a/toolchain/sem_ir/file.cpp b/toolchain/sem_ir/file.cpp index 1d57897bde61..c75578c7209a 100644 --- a/toolchain/sem_ir/file.cpp +++ b/toolchain/sem_ir/file.cpp @@ -4,6 +4,10 @@ #include "toolchain/sem_ir/file.h" +#include +#include +#include + #include "common/check.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" diff --git a/toolchain/sem_ir/formatter.cpp b/toolchain/sem_ir/formatter.cpp index be85b29ccdb4..c289830af9ad 100644 --- a/toolchain/sem_ir/formatter.cpp +++ b/toolchain/sem_ir/formatter.cpp @@ -4,6 +4,9 @@ #include "toolchain/sem_ir/formatter.h" +#include +#include + #include "common/ostream.h" #include "llvm/ADT/Sequence.h" #include "llvm/ADT/StringExtras.h" diff --git a/toolchain/sem_ir/function.cpp b/toolchain/sem_ir/function.cpp index 10593cad0cdf..039afdd7e8bd 100644 --- a/toolchain/sem_ir/function.cpp +++ b/toolchain/sem_ir/function.cpp @@ -4,6 +4,8 @@ #include "toolchain/sem_ir/function.h" +#include + #include "toolchain/sem_ir/file.h" #include "toolchain/sem_ir/generic.h" #include "toolchain/sem_ir/ids.h" diff --git a/toolchain/sem_ir/ids_test.cpp b/toolchain/sem_ir/ids_test.cpp index 7807f3072a7f..338e2046dcc6 100644 --- a/toolchain/sem_ir/ids_test.cpp +++ b/toolchain/sem_ir/ids_test.cpp @@ -8,6 +8,7 @@ #include #include +#include namespace Carbon::SemIR { namespace { diff --git a/toolchain/sem_ir/inst.cpp b/toolchain/sem_ir/inst.cpp index 0ccbe9d14446..5a33aea20c12 100644 --- a/toolchain/sem_ir/inst.cpp +++ b/toolchain/sem_ir/inst.cpp @@ -4,6 +4,8 @@ #include "toolchain/sem_ir/inst.h" +#include + namespace Carbon::SemIR { auto Inst::Print(llvm::raw_ostream& out) const -> void { diff --git a/toolchain/sem_ir/inst_fingerprinter.cpp b/toolchain/sem_ir/inst_fingerprinter.cpp index 57dc3338d0ac..13bb9bacc2b0 100644 --- a/toolchain/sem_ir/inst_fingerprinter.cpp +++ b/toolchain/sem_ir/inst_fingerprinter.cpp @@ -4,6 +4,8 @@ #include "toolchain/sem_ir/inst_fingerprinter.h" +#include +#include #include #include "common/ostream.h" diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index d2d3516d328e..616b6182a8c0 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -4,6 +4,10 @@ #include "toolchain/sem_ir/inst_namer.h" +#include +#include +#include + #include "common/ostream.h" #include "common/raw_string_ostream.h" #include "llvm/ADT/STLExtras.h" diff --git a/toolchain/sem_ir/name_scope.cpp b/toolchain/sem_ir/name_scope.cpp index 60741307c0a4..acbf60c6a5dc 100644 --- a/toolchain/sem_ir/name_scope.cpp +++ b/toolchain/sem_ir/name_scope.cpp @@ -4,6 +4,9 @@ #include "toolchain/sem_ir/name_scope.h" +#include +#include + #include "toolchain/sem_ir/file.h" namespace Carbon::SemIR { diff --git a/toolchain/sem_ir/stringify.cpp b/toolchain/sem_ir/stringify.cpp index bbbe580140f4..69174fa10ae4 100644 --- a/toolchain/sem_ir/stringify.cpp +++ b/toolchain/sem_ir/stringify.cpp @@ -4,6 +4,11 @@ #include "toolchain/sem_ir/stringify.h" +#include +#include +#include +#include + #include "common/raw_string_ostream.h" #include "common/variant_helpers.h" #include "toolchain/base/kind_switch.h" diff --git a/toolchain/sem_ir/type.cpp b/toolchain/sem_ir/type.cpp index 8b95785b0129..484303744fdd 100644 --- a/toolchain/sem_ir/type.cpp +++ b/toolchain/sem_ir/type.cpp @@ -4,6 +4,8 @@ #include "toolchain/sem_ir/type.h" +#include + #include "toolchain/sem_ir/file.h" namespace Carbon::SemIR { diff --git a/toolchain/sem_ir/type_info.cpp b/toolchain/sem_ir/type_info.cpp index fb6c80f512fc..64ebe168ffdc 100644 --- a/toolchain/sem_ir/type_info.cpp +++ b/toolchain/sem_ir/type_info.cpp @@ -4,6 +4,8 @@ #include "toolchain/sem_ir/type_info.h" +#include + #include "common/raw_string_ostream.h" #include "toolchain/sem_ir/file.h" diff --git a/toolchain/source/source_buffer.cpp b/toolchain/source/source_buffer.cpp index 7078e13b6799..55faa92ee88a 100644 --- a/toolchain/source/source_buffer.cpp +++ b/toolchain/source/source_buffer.cpp @@ -5,6 +5,8 @@ #include "toolchain/source/source_buffer.h" #include +#include +#include #include "llvm/Support/ErrorOr.h" #include "toolchain/diagnostics/file_diagnostics.h" diff --git a/toolchain/testing/compile_helper.cpp b/toolchain/testing/compile_helper.cpp index 380e2d9f0cbc..5d3330ff0b0c 100644 --- a/toolchain/testing/compile_helper.cpp +++ b/toolchain/testing/compile_helper.cpp @@ -4,6 +4,9 @@ #include "toolchain/testing/compile_helper.h" +#include +#include + namespace Carbon::Testing { auto CompileHelper::GetTokenizedBuffer(llvm::StringRef text, diff --git a/toolchain/testing/file_test.cpp b/toolchain/testing/file_test.cpp index ae03ff1b5f61..f257d1abefa2 100644 --- a/toolchain/testing/file_test.cpp +++ b/toolchain/testing/file_test.cpp @@ -6,8 +6,10 @@ #define CARBON_TOOLCHAIN_DRIVER_DRIVER_FILE_TEST_BASE_H_ #include +#include #include #include +#include #include "absl/strings/str_replace.h" #include "common/error.h" diff --git a/toolchain/testing/yaml_test_helpers.cpp b/toolchain/testing/yaml_test_helpers.cpp index 118391d799bd..036430c2c35b 100644 --- a/toolchain/testing/yaml_test_helpers.cpp +++ b/toolchain/testing/yaml_test_helpers.cpp @@ -4,6 +4,13 @@ #include "toolchain/testing/yaml_test_helpers.h" +#include +#include +#include +#include +#include +#include + #include "common/raw_string_ostream.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/YAMLParser.h"