[libcxx-commits] [libcxx] 0c731b0 - [libc++][CI] Fixes robust against ADL for C++03.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jan 8 07:43:31 PST 2023


Author: Mark de Wever
Date: 2023-01-08T16:43:23+01:00
New Revision: 0c731b0c00f5e2ca1143fd0061064e897059ef05

URL: https://github.com/llvm/llvm-project/commit/0c731b0c00f5e2ca1143fd0061064e897059ef05
DIFF: https://github.com/llvm/llvm-project/commit/0c731b0c00f5e2ca1143fd0061064e897059ef05.diff

LOG: [libc++][CI] Fixes robust against ADL for C++03.

This was disabled in D139545.

Reviewed By: philnik, #libc

Differential Revision: https://reviews.llvm.org/D140731

Added: 
    

Modified: 
    libcxx/include/__functional/invoke.h
    libcxx/utils/ci/run-buildbot

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__functional/invoke.h b/libcxx/include/__functional/invoke.h
index fdbbce029e88..a2ac5f217f70 100644
--- a/libcxx/include/__functional/invoke.h
+++ b/libcxx/include/__functional/invoke.h
@@ -428,15 +428,23 @@ struct __nothrow_invokable_r_imp<true, false, _Ret, _Fp, _Args...>
     template <class _Tp>
     static void __test_noexcept(_Tp) _NOEXCEPT;
 
+#ifdef _LIBCPP_CXX03_LANG
+    static const bool value = false;
+#else
     static const bool value = noexcept(_ThisT::__test_noexcept<_Ret>(
         _VSTD::__invoke(declval<_Fp>(), declval<_Args>()...)));
+#endif
 };
 
 template <class _Ret, class _Fp, class ..._Args>
 struct __nothrow_invokable_r_imp<true, true, _Ret, _Fp, _Args...>
 {
+#ifdef _LIBCPP_CXX03_LANG
+    static const bool value = false;
+#else
     static const bool value = noexcept(
         _VSTD::__invoke(declval<_Fp>(), declval<_Args>()...));
+#endif
 };
 
 template <class _Ret, class _Fp, class ..._Args>

diff  --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index e17eaf18d50a..3ee025c19e06 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -226,9 +226,8 @@ check-generated-output)
 #
 generic-cxx03)
     clean
-    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake"
-    #generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake" \
-    #               -DLIBCXX_ENABLE_CLANG_TIDY=ON
+    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake" \
+                   -DLIBCXX_ENABLE_CLANG_TIDY=ON
     check-runtimes
     check-abi-list
 ;;


        


More information about the libcxx-commits mailing list