From 41fd507e8fe7279d85fcea809ff5b75134cefe31 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 11 Oct 2026 06:54:21 +0200 Subject: [PATCH] Silence a clang-tidy use-after-move finding in the json_view test const_text is const, so std::move does not move from it; the second call is part of the const rvalue test. Signed-off-by: Niels Lohmann --- tests/src/unit-json_view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/unit-json_view.cpp b/tests/src/unit-json_view.cpp index b92dcae1a..720576062 100644 --- a/tests/src/unit-json_view.cpp +++ b/tests/src/unit-json_view.cpp @@ -366,7 +366,7 @@ TEST_CASE("json_view") CHECK(from_const_rvalue.source().data() != const_text.data()); // NOLINT(bugprone-use-after-move,hicpp-invalid-access-moved): const, not moved from CHECK(from_const_rvalue.root().materialize() == expected); json_document read_const_rvalue; - read_const_rvalue.read(std::move(const_text)); // NOLINT(performance-move-const-arg,hicpp-move-const-arg) + read_const_rvalue.read(std::move(const_text)); // NOLINT(performance-move-const-arg,hicpp-move-const-arg,bugprone-use-after-move,hicpp-invalid-access-moved) CHECK(read_const_rvalue.owns_source()); CHECK(read_const_rvalue.root().materialize() == expected); const std::vector const_chars(text.begin(), text.end());