[libcxx-commits] [libcxx] [ASan][libc++] Update string ASan annotations to Zero-overhead (PR #76165)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 21 08:56:40 PST 2023


================
@@ -659,6 +659,13 @@ _LIBCPP_PUSH_MACROS
 #else
 #  define _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS
 #endif
+#ifndef _IF_ASAN
+#  ifndef _LIBCPP_HAS_NO_ASAN
+#    define _IF_ASAN() if _LIBCPP_CONSTEXPR (true)
----------------
EricWF wrote:

Please put this in __config. And you were right, we should name this `_LIBCPP_IF_ASAN()`.

https://github.com/llvm/llvm-project/pull/76165


More information about the libcxx-commits mailing list