From d3637f7fbc6c2afa7b4a0f75eb767519f59edd8d Mon Sep 17 00:00:00 2001 From: Alvin Wong Date: Sat, 28 Jan 2023 21:49:37 +0800 Subject: [PATCH] tests: Fix and enable cpp20/custom_error for incoming LLVM 16 Tested with a recent llvm-mingw build very close to LLVM 16 rc1. --- test/test_cpp20/custom_error.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/test_cpp20/custom_error.cpp b/test/test_cpp20/custom_error.cpp index e7e4b83aa..bdb88dcd3 100644 --- a/test/test_cpp20/custom_error.cpp +++ b/test/test_cpp20/custom_error.cpp @@ -36,11 +36,14 @@ namespace } } -#if defined(__clang__) +#if defined(__clang__) && defined(_MSC_VER) // FIXME: Blocked on __cpp_consteval, see: // * https://github.com/microsoft/cppwinrt/pull/1203#issuecomment-1279764927 // * https://github.com/llvm/llvm-project/issues/57094 TEST_CASE("custom_error_logger", "[!shouldfail]") +#elif defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 160000 +// not available in libc++ before LLVM 16 +TEST_CASE("custom_error_logger", "[!shouldfail]") #else TEST_CASE("custom_error_logger") #endif @@ -61,6 +64,8 @@ TEST_CASE("custom_error_logger") REQUIRE(!functionNameSv.empty()); #if defined(__GNUC__) && !defined(__clang__) REQUIRE(functionNameSv == "void {anonymous}::FailOnLine15()"); +#elif defined(__GNUC__) && defined(__clang__) + REQUIRE(functionNameSv == "void (anonymous namespace)::FailOnLine15()"); #else REQUIRE(functionNameSv == "FailOnLine15"); #endif