[libcxx-commits] [PATCH] D140731: [libc++][CI] Fixes robust against ADL for C++03.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jan 8 05:17:13 PST 2023


Mordante updated this revision to Diff 487169.
Mordante added a comment.

Uses an alternative approach as suggested by philnik.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140731/new/

https://reviews.llvm.org/D140731

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


Index: libcxx/utils/ci/run-buildbot
===================================================================
--- libcxx/utils/ci/run-buildbot
+++ libcxx/utils/ci/run-buildbot
@@ -226,9 +226,8 @@
 #
 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
 ;;
Index: libcxx/include/__functional/invoke.h
===================================================================
--- libcxx/include/__functional/invoke.h
+++ libcxx/include/__functional/invoke.h
@@ -428,15 +428,23 @@
     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>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140731.487169.patch
Type: text/x-patch
Size: 1492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230108/6ea4de03/attachment.bin>


More information about the libcxx-commits mailing list