From 702f9894b1584df5f92d5ae6772398d21cd20970 Mon Sep 17 00:00:00 2001 From: Braxton Salyer Date: Wed, 13 Mar 2024 19:56:31 -0500 Subject: [PATCH] Fix clang-tidy warning in `indexed_bounds_check_fn::operator()` Fix use-after-move of `loc` --- include/flux/core/assert.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/flux/core/assert.hpp b/include/flux/core/assert.hpp index c6a580a7..5c1416be 100644 --- a/include/flux/core/assert.hpp +++ b/include/flux/core/assert.hpp @@ -88,8 +88,8 @@ struct indexed_bounds_check_fn { } } #endif - assert_fn{}(idx >= T{0}, "index cannot be negative", std::move(loc)); - assert_fn{}(idx < limit, "out-of-bounds sequence access", std::move(loc)); + assert_fn{}(idx >= T{0}, "index cannot be negative", loc); + assert_fn{}(idx < limit, "out-of-bounds sequence access", loc); } } };