Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
// These compiler versions don't enable sized deallocation by default.
// UNSUPPORTED: clang-17, clang-18

// Android clang-r536225 identifies as clang-19.0 but it predates the real
// LLVM 19.0.0, so it also leaves sized deallocation off by default.
// UNSUPPORTED: android && clang-19.0

// UNSUPPORTED: sanitizer-new-delete, c++03, c++11
// XFAIL: apple-clang
// XFAIL: using-built-library-before-llvm-11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
// These compiler versions do not enable sized deallocation by default.
// UNSUPPORTED: clang-17, clang-18

// Android clang-r536225 identifies as clang-19.0 but it predates the real
// LLVM 19.0.0, so it also leaves sized deallocation off by default.
// UNSUPPORTED: android && clang-19.0

// UNSUPPORTED: sanitizer-new-delete, c++03, c++11
// XFAIL: apple-clang
// XFAIL: using-built-library-before-llvm-11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ typedef void (*FunctionPtr)();
int main(int, char**)
{
test_is_array<char[3]>();
// Android clang-r536225 identifies as clang-19.0, but it predates the
// LLVM 19.0.0 release. It lacks llvm.org/pr86652, which changed __is_array
// to return false for T[0]. llvm.org/pr93037 relies on that change for
// correct handling of std::is_array<T[0]>. This test will pass as long as
// Clang and libc++ come from the same LLVM commit, but we can't detect that
// here.
#if !defined(__ANDROID__) || __clang_major__ != 19 || __clang_minor__ != 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use TEST_CLANG_VER instead? I think we're more likely to grep for that and eventually remove it than __clang_major__.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that should work. I changed it to #if !defined(__ANDROID__) || TEST_CLANG_VER != 1900 and verified that the test still passes locally in my updated Docker image.

test_is_not_array<char[0]>();
#endif
test_is_array<char[]>();
test_is_array<Union[]>();

Expand Down
Loading