Skip to content

Commit a79ad33

Browse files
[libcxx] Add span includes to some mdspan tests
This is needed to get these tests to pass in the following configuration: cmake -GNinja -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_PROJECTS="clang" \ -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \ -DLIBCXX_TEST_PARAMS="enable_modules=clang" \ -DLIBCXXABI_TEST_PARAMS="enable_modules=clang" \ ../llvm ninja check-cxx (Within the premerge build). This patch specifically handles some missing <span> includes for invocations of std::span in these tests. There are some other cases where we need dynamic_extent that are handled in llvm#142925. This seems to be related to 5e19fd1 which added in some similar includes. Reviewers: ldionne, #reviewers-libcxx, philnik777 Pull Request: llvm#142693
1 parent 33fae08 commit a79ad33

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_span.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
// for every rank index r.
2929
//
3030

31+
#include <span>
3132
#include <mdspan>
3233
#include <cassert>
3334

libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_array.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
//
3131
// 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]).
3232

33+
#include <span>
3334
#include <mdspan>
3435
#include <cassert>
3536

libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.ctor.extents_span.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
//
3131
// 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]).
3232

33+
#include <span>
3334
#include <mdspan>
3435
#include <cassert>
3536

0 commit comments

Comments
 (0)