diff --git a/tests/pure_cpp/smart_holder_poc_test.cpp b/tests/pure_cpp/smart_holder_poc_test.cpp index f820b9bf6..a9ad0364e 100644 --- a/tests/pure_cpp/smart_holder_poc_test.cpp +++ b/tests/pure_cpp/smart_holder_poc_test.cpp @@ -164,6 +164,7 @@ TEST_CASE("from_raw_ptr_take_ownership+disown+reclaim_disowned", "[S]") { REQUIRE(*new_owner == 19); hld.reclaim_disowned(); // Manually veriified: without this, clang++ -fsanitize=address reports // "detected memory leaks". + // NOLINTNEXTLINE(bugprone-unused-return-value) (void) new_owner.release(); // Manually verified: without this, clang++ -fsanitize=address // reports "attempting double-free". REQUIRE(hld.as_lvalue_ref() == 19);