Skip to content

Commit 71f37d0

Browse files
committed
Clean and format #include directives.
Change-Id: Iba5a0f3a18245a22f68ba1c3d533200cc577a596 Reviewed-on: https://code-review.googlesource.com/c/re2/+/63130 Reviewed-by: Alex Chernyakhovsky <achernya@google.com> Reviewed-by: Paul Wankadia <junyer@google.com>
1 parent 9d2c825 commit 71f37d0

60 files changed

Lines changed: 207 additions & 123 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BUILD.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ cc_library(
8383
"@abseil-cpp//absl/container:flat_hash_map",
8484
"@abseil-cpp//absl/container:flat_hash_set",
8585
"@abseil-cpp//absl/container:inlined_vector",
86+
"@abseil-cpp//absl/hash",
8687
"@abseil-cpp//absl/log:absl_check",
8788
"@abseil-cpp//absl/log:absl_log",
8889
"@abseil-cpp//absl/strings",
@@ -165,6 +166,7 @@ cc_test(
165166
"@abseil-cpp//absl/base:core_headers",
166167
"@abseil-cpp//absl/log:absl_check",
167168
"@abseil-cpp//absl/log:absl_log",
169+
"@abseil-cpp//absl/strings",
168170
"@googletest//:gtest",
169171
"@googletest//:gtest_main",
170172
],
@@ -239,6 +241,7 @@ cc_test(
239241
"@abseil-cpp//absl/base:core_headers",
240242
"@abseil-cpp//absl/log:absl_check",
241243
"@abseil-cpp//absl/log:absl_log",
244+
"@abseil-cpp//absl/types:optional",
242245
"@googletest//:gtest",
243246
"@googletest//:gtest_main",
244247
],
@@ -254,6 +257,7 @@ cc_test(
254257
"@abseil-cpp//absl/base:core_headers",
255258
"@abseil-cpp//absl/log:absl_check",
256259
"@abseil-cpp//absl/log:absl_log",
260+
"@abseil-cpp//absl/strings",
257261
"@abseil-cpp//absl/strings:str_format",
258262
"@googletest//:gtest",
259263
"@googletest//:gtest_main",
@@ -333,6 +337,7 @@ cc_test(
333337
srcs = ["re2/testing/string_generator_test.cc"],
334338
deps = [
335339
":testing",
340+
"@abseil-cpp//absl/strings",
336341
"@googletest//:gtest",
337342
"@googletest//:gtest_main",
338343
],
@@ -349,6 +354,7 @@ cc_test(
349354
"@abseil-cpp//absl/flags:flag",
350355
"@abseil-cpp//absl/log:absl_check",
351356
"@abseil-cpp//absl/log:absl_log",
357+
"@abseil-cpp//absl/strings",
352358
"@abseil-cpp//absl/strings:str_format",
353359
"@googletest//:gtest",
354360
"@googletest//:gtest_main",
@@ -423,6 +429,7 @@ cc_binary(
423429
"@abseil-cpp//absl/flags:flag",
424430
"@abseil-cpp//absl/log:absl_check",
425431
"@abseil-cpp//absl/log:absl_log",
432+
"@abseil-cpp//absl/strings",
426433
"@abseil-cpp//absl/strings:str_format",
427434
"@abseil-cpp//absl/synchronization",
428435
"@google_benchmark//:benchmark_main",

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ set(ABSL_DEPS
6868
absl_flags
6969
absl_flat_hash_map
7070
absl_flat_hash_set
71+
absl_hash
7172
absl_inlined_vector
7273
absl_optional
7374
absl_span

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ABSL_DEPS=\
1212
absl_flags\
1313
absl_flat_hash_map\
1414
absl_flat_hash_set\
15+
absl_hash\
1516
absl_inlined_vector\
1617
absl_optional\
1718
absl_span\

python/_re2.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
#include <stddef.h>
6+
#include <sys/types.h>
7+
58
#include <memory>
9+
#include <stdexcept>
610
#include <string>
711
#include <tuple>
812
#include <utility>
913
#include <vector>
1014

11-
#include <pybind11/pybind11.h>
12-
#include <pybind11/stl.h>
1315
#include "absl/strings/string_view.h"
16+
#include "pybind11/buffer_info.h"
17+
#include "pybind11/gil.h"
18+
#include "pybind11/pybind11.h"
19+
#include "pybind11/pytypes.h"
1420
#include "re2/filtered_re2.h"
1521
#include "re2/re2.h"
1622
#include "re2/set.h"

re2/bitmap256.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77
#include <stdint.h>
88

9-
#include "absl/base/macros.h"
9+
#include "absl/base/attributes.h"
1010
#include "absl/log/absl_check.h"
11-
#include "absl/log/absl_log.h"
1211

1312
namespace re2 {
1413

re2/bitmap256.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
#ifndef RE2_BITMAP256_H_
66
#define RE2_BITMAP256_H_
77

8-
#ifdef _MSC_VER
9-
#include <intrin.h>
10-
#endif
118
#include <stdint.h>
129
#include <string.h>
1310

1411
#include "absl/log/absl_check.h"
1512
#include "absl/log/absl_log.h"
1613

14+
#ifdef _MSC_VER
15+
#include <intrin.h>
16+
#endif
17+
1718
namespace re2 {
1819

1920
class Bitmap256 {

re2/bitstate.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
#include <stddef.h>
2121
#include <stdint.h>
2222
#include <string.h>
23+
2324
#include <limits>
2425
#include <utility>
2526

2627
#include "absl/log/absl_check.h"
2728
#include "absl/log/absl_log.h"
29+
#include "absl/strings/string_view.h"
2830
#include "re2/pod_array.h"
2931
#include "re2/prog.h"
3032
#include "re2/regexp.h"

re2/compile.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,20 @@
1010

1111
#include <stdint.h>
1212
#include <string.h>
13+
14+
#include <string>
1315
#include <utility>
1416

15-
#include "absl/base/macros.h"
1617
#include "absl/container/flat_hash_map.h"
1718
#include "absl/log/absl_check.h"
1819
#include "absl/log/absl_log.h"
19-
#include "util/utf.h"
20+
#include "absl/strings/string_view.h"
2021
#include "re2/pod_array.h"
2122
#include "re2/prog.h"
2223
#include "re2/re2.h"
2324
#include "re2/regexp.h"
2425
#include "re2/walker-inl.h"
26+
#include "util/utf.h"
2527

2628
namespace re2 {
2729

re2/dfa.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,32 @@
2525
#include <stdint.h>
2626
#include <stdio.h>
2727
#include <string.h>
28+
2829
#include <algorithm>
2930
#include <atomic>
3031
#include <deque>
31-
#include <new>
32+
#include <memory>
3233
#include <string>
3334
#include <utility>
3435
#include <vector>
3536

37+
#include "absl/base/attributes.h"
3638
#include "absl/base/call_once.h"
37-
#include "absl/base/macros.h"
3839
#include "absl/base/thread_annotations.h"
3940
#include "absl/container/flat_hash_map.h"
4041
#include "absl/container/flat_hash_set.h"
42+
#include "absl/hash/hash.h"
4143
#include "absl/log/absl_check.h"
4244
#include "absl/log/absl_log.h"
4345
#include "absl/strings/str_format.h"
46+
#include "absl/strings/string_view.h"
4447
#include "absl/synchronization/mutex.h"
4548
#include "absl/types/span.h"
46-
#include "util/strutil.h"
4749
#include "re2/pod_array.h"
4850
#include "re2/prog.h"
4951
#include "re2/re2.h"
5052
#include "re2/sparse_set.h"
53+
#include "util/strutil.h"
5154

5255
// Silence "zero-sized array in struct/union" warning for DFA::State::next_.
5356
#ifdef _MSC_VER

re2/filtered_re2.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
#include "re2/filtered_re2.h"
66

77
#include <stddef.h>
8+
89
#include <string>
910
#include <utility>
11+
#include <vector>
1012

11-
#include "absl/log/absl_check.h"
1213
#include "absl/log/absl_log.h"
14+
#include "absl/strings/string_view.h"
1315
#include "re2/prefilter.h"
1416
#include "re2/prefilter_tree.h"
1517

0 commit comments

Comments
 (0)