[libcxx-commits] [libcxx] 2bee460 - [libc++] Prevent ADL on _Block_copy/_Block_release (#179614)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Feb 16 06:23:45 PST 2026
Author: Fady Farag
Date: 2026-02-16T15:23:40+01:00
New Revision: 2bee460f010839ff1fe45f2391f1737b29c00439
URL: https://github.com/llvm/llvm-project/commit/2bee460f010839ff1fe45f2391f1737b29c00439
DIFF: https://github.com/llvm/llvm-project/commit/2bee460f010839ff1fe45f2391f1737b29c00439.diff
LOG: [libc++] Prevent ADL on _Block_copy/_Block_release (#179614)
Suppress ADL on Blocks runtime calls in std::function.
Added:
Modified:
libcxx/include/__functional/function.h
Removed:
################################################################################
diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index 121417f90ff01..c1675879ec19f 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -540,7 +540,7 @@ class __func<_Rp1 (^)(_ArgTypes1...), _Rp(_ArgTypes...)> : public __base<_Rp(_Ar
# if __has_feature(objc_arc)
: __f_(__f)
# else
- : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
+ : __f_(reinterpret_cast<__block_type>(__f ? __function::_Block_copy(__f) : nullptr))
# endif
{
}
@@ -563,7 +563,7 @@ class __func<_Rp1 (^)(_ArgTypes1...), _Rp(_ArgTypes...)> : public __base<_Rp(_Ar
_LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void destroy() _NOEXCEPT {
# if !__has_feature(objc_arc)
if (__f_)
- _Block_release(__f_);
+ __function::_Block_release(__f_);
# endif
__f_ = 0;
}
More information about the libcxx-commits
mailing list