[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
Wed Dec 28 11:04:20 PST 2022


Mordante created this revision.
Mordante added a reviewer: philnik.
Herald added a subscriber: arichardson.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This was disabled in D139545 <https://reviews.llvm.org/D139545>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140731

Files:
  libcxx/test/tools/clang_tidy_checks/robust_against_adl.cpp
  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/test/tools/clang_tidy_checks/robust_against_adl.cpp
===================================================================
--- libcxx/test/tools/clang_tidy_checks/robust_against_adl.cpp
+++ libcxx/test/tools/clang_tidy_checks/robust_against_adl.cpp
@@ -19,8 +19,11 @@
 AST_MATCHER(clang::CallExpr, isOperator) { return llvm::isa<clang::CXXOperatorCallExpr>(Node); }
 
 AST_MATCHER(clang::UnresolvedLookupExpr, isCustomizationPoint) {
+  // In C++03 there is no noexcept operator. This is used in libc++, to avoid
+  // warnings pretend noexcept is a customization point.
   return std::ranges::any_of(
-      std::array{"swap", "make_error_code", "make_error_condition", "begin", "end", "size", "rend", "rbegin"},
+      std::array{
+          "swap", "make_error_code", "make_error_condition", "begin", "end", "size", "rend", "rbegin", "noexcept"},
       [&](const char* func) { return Node.getName().getAsString() == func; });
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140731.485524.patch
Type: text/x-patch
Size: 1562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221228/c4ac2782/attachment.bin>


More information about the libcxx-commits mailing list