Skip to content

Commit

Permalink
Run Clang's Include Cleaner on //android, //client and //composer.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 633867032
  • Loading branch information
tomokinat authored and hiroyuki-komatsu committed May 15, 2024
1 parent c92bb73 commit 91b9a29
Show file tree
Hide file tree
Showing 37 changed files with 126 additions and 58 deletions.
3 changes: 2 additions & 1 deletion src/android/jni/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ mozc_cc_library(
# Scheuklappen: keep
visibility = ["//visibility:private"],
deps = [
"//base:logging",
"//base:singleton",
"//base:system_util",
"//base:util",
Expand All @@ -61,6 +60,8 @@ mozc_cc_library(
"//protocol:commands_cc_proto",
"//session:session_handler",
"//session:session_usage_observer",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/random",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
Expand Down
3 changes: 2 additions & 1 deletion src/android/jni/mozcjni.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@

#include <memory>

#include "absl/log/check.h"
#include "absl/log/log.h"
#include "absl/random/random.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "base/logging.h"
#include "base/singleton.h"
#include "base/system_util.h"
#include "base/util.h"
Expand Down
9 changes: 9 additions & 0 deletions src/base/protobuf/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ mozc_cc_library(
],
)

mozc_cc_library(
name = "repeated_ptr_field",
hdrs = ["repeated_ptr_field.h"],
deps = [
":protobuf",
"@com_google_protobuf//:protobuf",
],
)

mozc_cc_library(
name = "text_format",
hdrs = ["text_format.h"],
Expand Down
37 changes: 37 additions & 0 deletions src/base/protobuf/repeated_ptr_field.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright 2010-2021, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#ifndef MOZC_BASE_PROTOBUF_REPEATED_PTR_FIELD_H_
#define MOZC_BASE_PROTOBUF_REPEATED_PTR_FIELD_H_

#include "base/protobuf/protobuf.h" // IWYU pragma: keep

#include "google/protobuf/repeated_ptr_field.h" // IWYU pragma: export

#endif // MOZC_BASE_PROTOBUF_REPEATED_PTR_FIELD_H_
1 change: 1 addition & 0 deletions src/base/strings/internal/utf8_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class DecodeResult {

// Returns the byte length of a single UTF-8 character based on the leading
// byte.
// IWYU pragma: private, include "base/strings/unicode.h"
constexpr uint_fast8_t OneCharLen(const char c) {
return utf8_internal::kUtf8LenTbl[static_cast<uint_fast8_t>(c)];
}
Expand Down
19 changes: 10 additions & 9 deletions src/client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ mozc_cc_library(
"//base:const",
"//base:file_stream",
"//base:file_util",
"//base:logging",
"//base:process",
"//base:run_level",
"//base:singleton",
Expand Down Expand Up @@ -115,7 +114,6 @@ mozc_cc_test(
deps = [
":client",
":client_interface",
"//base:logging",
"//base:number_util",
"//base:version",
"//base/strings:assign",
Expand All @@ -127,6 +125,7 @@ mozc_cc_test(
"//protocol:config_cc_proto",
"//testing:gunit_main",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/strings",
],
)
Expand All @@ -138,6 +137,7 @@ mozc_cc_library(
visibility = ["//visibility:public"],
deps = [
":client_interface",
"//ipc",
"//protocol:commands_cc_proto",
"//protocol:config_cc_proto",
"//testing:gunit",
Expand All @@ -152,9 +152,8 @@ mozc_cc_binary(
deps = [
":client",
"//base:init_mozc",
"//base:logging",
"//base:process",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/log",
],
)

Expand All @@ -164,12 +163,14 @@ mozc_cc_binary(
deps = [
":client",
"//base:init_mozc",
"//base:logging",
"//base:vlog",
"//protocol:commands_cc_proto",
"//protocol:renderer_cc_proto",
"//renderer:renderer_client",
"//session:random_keyevents_generator",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/time",
],
)
Expand All @@ -182,7 +183,6 @@ mozc_cc_binary(
"//base:file_stream",
"//base:file_util",
"//base:init_mozc",
"//base:logging",
"//base:system_util",
"//base:util",
"//base:vlog",
Expand All @@ -191,6 +191,8 @@ mozc_cc_binary(
"//protocol:renderer_cc_proto",
"//renderer:renderer_client",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
Expand All @@ -205,7 +207,6 @@ mozc_cc_binary(
"//base:file_stream",
"//base:init_mozc",
"//base:japanese_util",
"//base:logging",
"//base:singleton",
"//base:stopwatch",
"//base:util",
Expand All @@ -215,6 +216,7 @@ mozc_cc_binary(
"//session:random_keyevents_generator",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/time",
Expand All @@ -228,7 +230,7 @@ mozc_cc_binary(
deps = [
":client",
"//base:init_mozc",
"//base:logging",
"@com_google_absl//absl/log",
],
)

Expand Down Expand Up @@ -260,7 +262,6 @@ mozc_cc_binary(
"//base:file_stream",
"//base:init_mozc",
"//base:japanese_util",
"//base:logging",
"//base:util",
"//base:vlog",
"//base/protobuf:message",
Expand Down
1 change: 1 addition & 0 deletions src/client/client_mock.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
#include "client/client_interface.h"
#include "ipc/ipc.h"
#include "protocol/commands.pb.h"
#include "protocol/config.pb.h"
#include "testing/gmock.h"
Expand Down
3 changes: 1 addition & 2 deletions src/client/client_performance_test_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <algorithm>
#include <climits>
#include <cmath>
#include <cstddef>
#include <cstdint>
Expand All @@ -45,14 +44,14 @@

#include "absl/algorithm/container.h"
#include "absl/flags/flag.h"
#include "absl/log/check.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
#include "absl/types/span.h"
#include "base/file_stream.h"
#include "base/init_mozc.h"
#include "base/japanese_util.h"
#include "base/logging.h"
#include "base/singleton.h"
#include "base/stopwatch.h"
#include "base/util.h"
Expand Down
1 change: 1 addition & 0 deletions src/client/client_quality_test_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <vector>

#include "evaluation/scorer.h"
#include "absl/container/flat_hash_map.h"
#include "absl/flags/flag.h"
#include "absl/log/check.h"
#include "absl/log/log.h"
Expand Down
4 changes: 3 additions & 1 deletion src/client/client_scenario_test_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
// events specified by FLAGS_input file or interactive standard input. Input
// file format is same as one of session/session_client_main.

#include <cstddef>
#include <cstdint>
#include <iostream>
#include <istream>
Expand All @@ -40,14 +41,15 @@
#include <vector>

#include "absl/flags/flag.h"
#include "absl/log/check.h"
#include "absl/log/log.h"
#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "base/file_stream.h"
#include "base/file_util.h"
#include "base/init_mozc.h"
#include "base/logging.h"
#include "base/system_util.h"
#include "base/util.h"
#include "base/vlog.h"
Expand Down
4 changes: 3 additions & 1 deletion src/client/client_stress_test_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@
#endif // _WIN32

#include "absl/flags/flag.h"
#include "absl/log/check.h"
#include "absl/log/log.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "base/init_mozc.h"
#include "base/logging.h"
#include "base/vlog.h"
#include "client/client.h"
#include "protocol/commands.pb.h"
#include "protocol/renderer_command.pb.h"
#include "renderer/renderer_client.h"
#include "session/random_keyevents_generator.h"
Expand Down
2 changes: 1 addition & 1 deletion src/client/client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
#include <vector>

#include "absl/container/flat_hash_map.h"
#include "absl/log/log.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "base/logging.h"
#include "base/number_util.h"
#include "base/strings/assign.h"
#include "base/version.h"
Expand Down
4 changes: 1 addition & 3 deletions src/client/ping_server_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <iostream> // NOLINT

#include "absl/log/log.h"
#include "base/init_mozc.h"
#include "base/logging.h"
#include "client/client.h"

// Simple command line tool to ping mozc server
Expand Down
8 changes: 4 additions & 4 deletions src/client/server_launcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@
#include <cstring>
#include <string>

#include "absl/log/log.h"
#include "absl/strings/string_view.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "base/const.h"
#include "base/file_stream.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/file_stream.h" // IWYU pragma: keep, for debug build
#include "base/file_util.h" // IWYU pragma: keep, for debug build
#include "base/process.h"
#include "base/run_level.h"
#include "base/system_util.h"
#include "base/vlog.h"
#include "client/client.h"
Expand All @@ -57,6 +56,7 @@
#include <shlobj.h>
#include <windows.h>

#include "base/run_level.h"
#include "base/win32/win_sandbox.h"
#else // _WIN32
#include <unistd.h>
Expand Down
4 changes: 1 addition & 3 deletions src/client/server_launcher_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <iostream> // NOLINT

#include "absl/flags/flag.h"
#include "absl/log/log.h"
#include "base/init_mozc.h"
#include "base/logging.h"
#include "client/client.h"

ABSL_FLAG(bool, shutdown, false, "shutdown server if mozc_server is running");
Expand Down
8 changes: 5 additions & 3 deletions src/composer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ mozc_cc_library(
"//transliteration",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:span",
Expand Down Expand Up @@ -100,15 +101,15 @@ mozc_cc_library(
deps = [
"//base:config_file_stream",
"//base:hash",
"//base:logging",
"//base:util",
"//base/container:trie",
"//composer/internal:special_key",
"//data_manager:data_manager_interface",
"//protocol:commands_cc_proto",
"//protocol:config_cc_proto",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/strings",
],
)
Expand Down Expand Up @@ -174,13 +175,14 @@ mozc_cc_library(
srcs = ["key_parser.cc"],
hdrs = ["key_parser.h"],
deps = [
"//base:logging",
"//base:util",
"//base:vlog",
"//protocol:commands_cc_proto",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
],
Expand Down
1 change: 1 addition & 0 deletions src/composer/composer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <vector>

#include "absl/hash/hash.h"
#include "absl/log/check.h"
#include "absl/log/log.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
Expand Down
Loading

0 comments on commit 91b9a29

Please sign in to comment.