From 2b5a46147074fc2d871e4ce64b4b863556c7fbd6 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Mon, 28 Apr 2025 17:57:08 +0200 Subject: [PATCH 1/2] Fix clang-tidy complaints about value parameters --- src/geom-functions.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/geom-functions.cpp b/src/geom-functions.cpp index 741354eec..a6db4c9ca 100644 --- a/src/geom-functions.cpp +++ b/src/geom-functions.cpp @@ -125,6 +125,7 @@ namespace { void set_to_same_type(geometry_t *output, geometry_t const &input) { + // NOLINTNEXTLINE(performance-unnecessary-value-param) input.visit([&](auto in) { output->set(); }); } @@ -434,7 +435,7 @@ class split_visitor {} template - void operator()(T) const + void operator()(T const &) const {} // false positive https://github.com/llvm/llvm-project/issues/74738 @@ -544,8 +545,9 @@ namespace { * empty, do not add the first point returned by *it. */ template -void add_nodes_to_linestring(linestring_t *linestring, ITERATOR it, - ITERATOR end) +void add_nodes_to_linestring( + linestring_t *linestring, ITERATOR it, + ITERATOR end) // NOLINT(performance-unnecessary-value-param) { if (!linestring->empty()) { assert(it != end); From 31650f2a29170208e8b829d49426ec96c9e3f1ad Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Mon, 28 Apr 2025 18:17:15 +0200 Subject: [PATCH 2/2] Disable a warning that's clearly wrong here --- src/wildcmp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wildcmp.cpp b/src/wildcmp.cpp index 9ae36d49b..219fb03a9 100644 --- a/src/wildcmp.cpp +++ b/src/wildcmp.cpp @@ -19,6 +19,7 @@ * * Returns if a match was found. */ +// NOLINTNEXTLINE(misc-use-internal-linkage) Seems there is a bug in the checker bool wild_match(char const *expr, char const *str) noexcept { // Code based on