Skip to content

Commit e38b080

Browse files
authored
Enable cpp20/custom_error for incoming LLVM 16 (#1265)
Tested with a recent llvm-mingw build very close to LLVM 16 rc1.
1 parent b5503ee commit e38b080

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/test_cpp20/custom_error.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,14 @@ namespace
3636
}
3737
}
3838

39-
#if defined(__clang__)
39+
#if defined(__clang__) && defined(_MSC_VER)
4040
// FIXME: Blocked on __cpp_consteval, see:
4141
// * https://github.com/microsoft/cppwinrt/pull/1203#issuecomment-1279764927
4242
// * https://github.com/llvm/llvm-project/issues/57094
4343
TEST_CASE("custom_error_logger", "[!shouldfail]")
44+
#elif defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 160000
45+
// <source_location> not available in libc++ before LLVM 16
46+
TEST_CASE("custom_error_logger", "[!shouldfail]")
4447
#else
4548
TEST_CASE("custom_error_logger")
4649
#endif
@@ -61,6 +64,8 @@ TEST_CASE("custom_error_logger")
6164
REQUIRE(!functionNameSv.empty());
6265
#if defined(__GNUC__) && !defined(__clang__)
6366
REQUIRE(functionNameSv == "void {anonymous}::FailOnLine15()");
67+
#elif defined(__GNUC__) && defined(__clang__)
68+
REQUIRE(functionNameSv == "void (anonymous namespace)::FailOnLine15()");
6469
#else
6570
REQUIRE(functionNameSv == "FailOnLine15");
6671
#endif

0 commit comments

Comments
 (0)