Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++] Avoid including libc++ private header in std/ test #79856

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Jan 29, 2024

Fixes #79783

@ldionne ldionne requested a review from a team as a code owner January 29, 2024 16:13
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jan 29, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 29, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

Fixes #79783


Full diff: https://github.com/llvm/llvm-project/pull/79856.diff

1 Files Affected:

  • (modified) libcxx/test/std/containers/sequences/array/size_and_alignment.compile.pass.cpp (+4-1)
diff --git a/libcxx/test/std/containers/sequences/array/size_and_alignment.compile.pass.cpp b/libcxx/test/std/containers/sequences/array/size_and_alignment.compile.pass.cpp
index b7fb40c988678ae..209e24964807d91 100644
--- a/libcxx/test/std/containers/sequences/array/size_and_alignment.compile.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/size_and_alignment.compile.pass.cpp
@@ -22,7 +22,10 @@
 #include <array>
 #include <cstddef>
 #include <type_traits>
-#include <__type_traits/datasizeof.h>
+
+#ifdef _LIBCPP_VERSION
+#  include <__type_traits/datasizeof.h>
+#endif
 
 #include "test_macros.h"
 

@ldionne ldionne merged commit c576ab6 into llvm:main Jan 29, 2024
53 checks passed
@ldionne ldionne deleted the review/fix-datasizeof branch January 29, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[libc++][test] array/size_and_alignment.compile.pass.cpp includes non-Standard <__type_traits/datasizeof.h>
3 participants