[libcxx-commits] [libcxx] [libc++][NFC] Refactor _LIBCPP_AVAILABILITY_HAS_* macros to always be defined (PR #71002)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 24 09:13:35 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff d9962c400f970d17396e84c1a55cdbea29a7c893 474dd0da13f91611bcb0a878be28f812b139c07c -- libcxx/include/__availability libcxx/include/__verbose_abort libcxx/include/fstream libcxx/include/sstream libcxx/include/version libcxx/src/ios.instantiations.cpp libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/barrier.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/latch.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/semaphore.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/stop_token.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
index 7993a729d1..2a73203bde 100644
--- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
+++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
@@ -137,7 +137,7 @@ int main(int argc, char **argv) {
       case 4: cv.wait_for(mut, wait, pred_function); break;
       case 5: cv.wait_until(mut, Clock::now() + wait); break;
       case 6: cv.wait_until(mut, Clock::now() + wait, pred_function); break;
-#if TEST_STD_VER >=20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN) && _LIBCPP_AVAILABILITY_HAS_SYNC
+#if TEST_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN) && _LIBCPP_AVAILABILITY_HAS_SYNC
       case 7: cv.wait(mut, std::stop_source{}.get_token(), pred_function); break;
       case 8: cv.wait_for(mut, std::stop_source{}.get_token(), wait, pred_function); break;
       case 9: cv.wait_until(mut, std::stop_source{}.get_token(), Clock::now() + wait, pred_function); break;

``````````

</details>


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


More information about the libcxx-commits mailing list