From 510fa60c0e1bb65b643dbeb1b967bb51b91695ba Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 25 Mar 2022 19:19:56 +0100 Subject: [PATCH] Ignore sanitizer error on scopedptr::takeownership --- src/Memory/__ScopedPtr.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Memory/__ScopedPtr.hpp b/src/Memory/__ScopedPtr.hpp index 0d7c6b3..7bfc88b 100644 --- a/src/Memory/__ScopedPtr.hpp +++ b/src/Memory/__ScopedPtr.hpp @@ -49,6 +49,9 @@ namespace ArbUt { inline T* non_null operator->() const noexcept { return _raw; } /// @brief Get the raw underlying pointer, and take ownership of it. This removes the existing pointer in here. + #if defined(__clang__) + [[clang::no_sanitize("nullability-assign")]] + #endif inline T* non_null TakeOwnership() noexcept { auto raw = _raw; _raw = nullptr;