[libcxx-commits] [libcxx] 5990624 - [libcxx] Add span includes to some mdspan tests (#142693)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 5 10:22:47 PDT 2025
Author: Aiden Grossman
Date: 2025-06-05T13:22:43-04:00
New Revision: 59906243836b871a42407c6a6279d35978abe2e2
URL: https://github.com/llvm/llvm-project/commit/59906243836b871a42407c6a6279d35978abe2e2
DIFF: https://github.com/llvm/llvm-project/commit/59906243836b871a42407c6a6279d35978abe2e2.diff
LOG: [libcxx] Add span includes to some mdspan tests (#142693)
This patch adds missing <span> includes for std::mdspan tests that use
std::span. There are other cases where we need dynamic_extent that are
handled in #142925.
This was found by running the test suite in the bootstrapping build
with Clang modules enabled.
Added:
Modified:
libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp
libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.pass.cpp
libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp
index 5bf5143590180..650fecf62128c 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp
@@ -28,8 +28,9 @@
// for every rank index r.
//
-#include <mdspan>
#include <cassert>
+#include <mdspan>
+#include <span>
#include "check_assertion.h"
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.pass.cpp
index 6782a9789f89f..860849ded2de2 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.pass.cpp
@@ -30,8 +30,9 @@
//
// Effects: Direct-non-list-initializes extents_ with e, and for all d in the range [0, rank_), direct-non-list-initializes strides_[d] with as_const(s[d]).
-#include <mdspan>
#include <cassert>
+#include <mdspan>
+#include <span>
#include "check_assertion.h"
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.pass.cpp
index 74e4793c91372..70ab0616ec01b 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.pass.cpp
@@ -30,8 +30,9 @@
//
// Effects: Direct-non-list-initializes extents_ with e, and for all d in the range [0, rank_), direct-non-list-initializes strides_[d] with as_const(s[d]).
-#include <mdspan>
#include <cassert>
+#include <mdspan>
+#include <span>
#include "check_assertion.h"
More information about the libcxx-commits
mailing list