Skip to content

Commit ca5a407

Browse files
cameroncusterCameron Custerweb-flow
authored
maintenance: mark gcc-118291 pass-self sites; drop obsolete #define filter in grep check (#231)
* note gcc bug 118291 at pass-self lambda sites; drop obsolete #define filter in grep check * [auto-verifier] verify commit 8ed3189 --------- Co-authored-by: Cameron Custer <cam@augmentcode.com> Co-authored-by: GitHub <noreply@github.com>
1 parent 1ca20ff commit ca5a407

9 files changed

Lines changed: 21 additions & 16 deletions

File tree

.verify-helper/timestamps.remote.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@
7474
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2026-07-07 09:27:22 -0700",
7575
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2026-07-07 09:27:22 -0700",
7676
"tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2026-07-07 09:27:22 -0700",
77-
"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-07-07 09:27:22 -0700",
77+
"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-07-07 10:12:26 -0700",
7878
"tests/library_checker_aizu_tests/handmade_tests/dsu.test.cpp": "2026-07-07 09:17:02 -0700",
7979
"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2026-07-07 09:27:22 -0700",
8080
"tests/library_checker_aizu_tests/handmade_tests/fib_matrix_expo.test.cpp": "2026-07-06 13:10:16 -0700",
8181
"tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2026-07-06 13:10:16 -0700",
8282
"tests/library_checker_aizu_tests/handmade_tests/hilbert_mos.test.cpp": "2026-07-06 13:10:16 -0700",
8383
"tests/library_checker_aizu_tests/handmade_tests/kd_bit.test.cpp": "2026-07-06 13:10:16 -0700",
84-
"tests/library_checker_aizu_tests/handmade_tests/kth_par.test.cpp": "2026-07-06 13:10:16 -0700",
84+
"tests/library_checker_aizu_tests/handmade_tests/kth_par.test.cpp": "2026-07-07 10:12:26 -0700",
8585
"tests/library_checker_aizu_tests/handmade_tests/manacher.test.cpp": "2026-07-06 13:10:16 -0700",
8686
"tests/library_checker_aizu_tests/handmade_tests/merge_st_and_wavelet.test.cpp": "2026-07-06 13:10:16 -0700",
8787
"tests/library_checker_aizu_tests/handmade_tests/mobius.test.cpp": "2026-07-06 13:10:16 -0700",
@@ -137,17 +137,17 @@
137137
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_update.test.cpp": "2026-07-07 09:27:22 -0700",
138138
"tests/library_checker_aizu_tests/trees/edge_cd_count_paths_per_length.test.cpp": "2026-07-07 09:27:22 -0700",
139139
"tests/library_checker_aizu_tests/trees/edge_cd_reroot_dp.test.cpp": "2026-07-07 09:27:22 -0700",
140-
"tests/library_checker_aizu_tests/trees/hld_aizu1.test.cpp": "2026-07-06 13:10:16 -0700",
141-
"tests/library_checker_aizu_tests/trees/hld_aizu2.test.cpp": "2026-07-06 13:10:16 -0700",
142-
"tests/library_checker_aizu_tests/trees/hld_lib_checker_path.test.cpp": "2026-07-06 13:10:16 -0700",
143-
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_edges.test.cpp": "2026-07-06 13:10:16 -0700",
144-
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_nodes.test.cpp": "2026-07-06 13:10:16 -0700",
145-
"tests/library_checker_aizu_tests/trees/kth_path_hagerup.test.cpp": "2026-07-06 13:10:16 -0700",
146-
"tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp": "2026-07-06 13:10:16 -0700",
147-
"tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp": "2026-07-06 13:10:16 -0700",
148-
"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2026-07-06 13:10:16 -0700",
149-
"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2026-07-06 13:10:16 -0700",
150-
"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2026-07-06 13:10:16 -0700",
140+
"tests/library_checker_aizu_tests/trees/hld_aizu1.test.cpp": "2026-07-07 10:12:26 -0700",
141+
"tests/library_checker_aizu_tests/trees/hld_aizu2.test.cpp": "2026-07-07 10:12:26 -0700",
142+
"tests/library_checker_aizu_tests/trees/hld_lib_checker_path.test.cpp": "2026-07-07 10:12:26 -0700",
143+
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_edges.test.cpp": "2026-07-07 10:12:26 -0700",
144+
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_nodes.test.cpp": "2026-07-07 10:12:26 -0700",
145+
"tests/library_checker_aizu_tests/trees/kth_path_hagerup.test.cpp": "2026-07-07 10:12:26 -0700",
146+
"tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp": "2026-07-07 10:12:26 -0700",
147+
"tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp": "2026-07-07 10:12:26 -0700",
148+
"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2026-07-07 10:12:26 -0700",
149+
"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2026-07-07 10:12:26 -0700",
150+
"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2026-07-07 10:12:26 -0700",
151151
"tests/library_checker_aizu_tests/trees/shallowest_aizu_tree_height.test.cpp": "2026-07-07 09:27:22 -0700",
152152
"tests/library_checker_aizu_tests/trees/shallowest_lib_checker_tree_path_composite.test.cpp": "2026-07-07 09:27:22 -0700",
153153
"tests/library_checker_aizu_tests/trees/subtree_isomorphism.test.cpp": "2026-07-07 09:27:22 -0700"

library/trees/hld.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ template<bool VALS_EDGES> struct HLD {
1414
int n;
1515
vi p, siz, rt, tin;
1616
HLD(auto& g): n(sz(g)), p(n), siz(n, 1), rt(n), tin(n) {
17+
// pass-self, not deducing this: gcc bug 118291
1718
auto dfs1 = [&](auto dfs1, int u) -> void {
1819
for (int& v : g[u]) {
1920
erase(g[v], p[v] = u);

library/trees/lca_rmq.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ struct LCA {
1616
LCA(const auto& g):
1717
n(sz(g)), tin(n), siz(n, 1), d(n), p(n) {
1818
vi order;
19+
// pass-self, not deducing this: gcc bug 118291
1920
auto dfs = [&](auto&& dfs, int u) -> void {
2021
tin[u] = sz(order), order.push_back(u);
2122
for (int v : g[u])

library/trees/linear_lca.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ struct linear_lca {
1313
linear_lca(const auto& g):
1414
n(sz(g)), d(n), in(n), asc(n), head(n + 1) {
1515
vector<pii> order;
16+
// pass-self, not deducing this: gcc bug 118291
1617
auto dfs = [&](auto&& dfs, int u, int p) -> void {
1718
order.emplace_back(u, p), in[u] = sz(order);
1819
for (int v : g[u])

library/trees/tree_lift.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
struct tree_lift {
1212
vi d, p, j;
1313
tree_lift(const auto& g): d(sz(g)), p(d), j(d) {
14+
// pass-self, not deducing this: gcc bug 118291
1415
auto dfs = [&](auto&& dfs, int u) -> void {
1516
int up = d[u] + d[j[j[u]]] == 2 * d[j[u]] ? j[j[u]]
1617
: u;

library/trees/uncommon/hagerup_kth_par.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ template<int K = 2> struct hagerup {
2121
jmp[t] = st[max(0, s - K * (t & -t))];
2222
t++;
2323
};
24+
// pass-self, not deducing this: gcc bug 118291
2425
auto dfs = [&](auto&& dfs, int u, int p) -> void {
2526
int& l = leaf[u] = st[d[u]] = u;
2627
pos[u] = t;

library/trees/uncommon/ladder_decomposition.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct ladder {
2020
n(sz(g)), d(n), p(n), idx(n), lad(2 * n) {
2121
int i = 0;
2222
vi st(n);
23+
// pass-self, not deducing this: gcc bug 118291
2324
auto dfs = [&](auto&& dfs, int u) -> vi {
2425
vi path;
2526
st[d[u]] = u;

library/trees/uncommon/linear_kth_par.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ struct linear_kth_par {
2323
jmp[t] += st[du - k];
2424
d_tour[t++] = du;
2525
};
26+
// pass-self, not deducing this: gcc bug 118291
2627
auto dfs = [&](auto&& dfs, int u, int p) -> vi {
2728
vi path;
2829
tin[st[d[u]] = u] = t;

tests/scripts/grep_clangformat_cppcheck.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ echo "check vi instead of vector<int>"
2727
grep "vector<int>" --recursive ../library/**/*.hpp && exit 1
2828

2929
echo "check begin(arr) instead of arr.begin(), similarly for end, rbegin, rend, empty, size:"
30-
# TODO: remove this define filter if/when we move to -std=c++20
31-
grep --invert-match --fixed-strings "#define" --recursive ../library/ library_checker_aizu_tests/ |
32-
grep --fixed-strings --regexp=".begin()" --regexp=".rbegin()" --regexp=".end()" --regexp=".rend()" --regexp=".empty()" --regexp=".size()" && exit 1
30+
grep --recursive ../library/ library_checker_aizu_tests/ --fixed-strings --regexp=".begin()" --regexp=".rbegin()" --regexp=".end()" --regexp=".rend()" --regexp=".empty()" --regexp=".size()" && exit 1
3331

3432
echo "check that there are no empty lines"
3533
grep "^$" ../library/**/*.hpp && exit 1

0 commit comments

Comments
 (0)