Skip to content

Commit f8aaab5

Browse files
committed
Match "struct" as well, not only "class"
1 parent 7854d90 commit f8aaab5

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed
Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clangxx -std=c++17 -I %sycl_include -I %sycl_include/sycl -fsycl-device-only -c -fno-color-diagnostics -Xclang -fdump-record-layouts-complete %s -o %t.out | grep -Pzo "0 \| class sycl::.*\n([^\n].*\n)*" | sort -z | FileCheck --implicit-check-not "{{std::basic_string|std::list}}" %s
2-
// RUN: %clangxx -std=c++17 -I %sycl_include -I %sycl_include/sycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts-complete %s -o %t.out | grep -Pzo "0 \| class sycl::.*\n([^\n].*\n)*" | sort -z | FileCheck --implicit-check-not "{{std::basic_string|std::list}}" %s
1+
// RUN: %clangxx -std=c++17 -I %sycl_include -I %sycl_include/sycl -fsycl-device-only -c -fno-color-diagnostics -Xclang -fdump-record-layouts-complete %s -o %t.out | grep -Pzo "0 \| (class|struct) sycl::.*\n([^\n].*\n)*" | sort -z | FileCheck --implicit-check-not "{{std::basic_string|std::list}}" %s
2+
// RUN: %clangxx -std=c++17 -I %sycl_include -I %sycl_include/sycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts-complete %s -o %t.out | grep -Pzo "0 \| (class|struct) sycl::.*\n([^\n].*\n)*" | sort -z | FileCheck --implicit-check-not "{{std::basic_string|std::list}}" %s
33
// REQUIRES: linux
44
// UNSUPPORTED: libcxx
55

@@ -12,9 +12,39 @@
1212
// default. All such data members can potentially cross ABI boundaries and
1313
// that's why we need to be sure that we use only ABI-neutral data members.
1414

15-
// Exclusions are NOT ALLOWED to this file unless it is guaranteed that data
16-
// member is not crossing ABI boundary. If there is a std::string/std::list
17-
// data member which is guaranteed to not cross ABI boundary then it must be
18-
// matched in this test explicitly.
15+
// New exclusions are NOT ALLOWED to this file unless it is guaranteed that data
16+
// member is not crossing ABI boundary. All current exclusions are listed below.
17+
18+
// CHECK: 0 | struct sycl::ext::oneapi::experimental::build_options
19+
// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::run_time_property_key<sycl::ext::oneapi::experimental::detail::BuildOptions> (base) (empty)
20+
// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::property_key_base_tag (base) (empty)
21+
// CHECK-NEXT: 0 | class std::vector<class std::basic_string<char> > opts
22+
// CHECK-NEXT: 0 | struct std::_Vector_base<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > > (base)
23+
// CHECK-NEXT: 0 | struct std::_Vector_base<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > >::_Vector_impl _M_impl
24+
// CHECK-NEXT: 0 | class std::allocator<class std::basic_string<char> > (base) (empty)
25+
// CHECK-NEXT: 0 | class {{(std|__gnu_cxx)}}::__new_allocator<class std::basic_string<char> > (base) (empty)
26+
// CHECK-NEXT: 0 | struct std::_Vector_base<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > >::_Vector_impl_data (base)
27+
28+
29+
// CHECK: 0 | struct sycl::ext::oneapi::experimental::include_files
30+
// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::run_time_property_key<sycl::ext::oneapi::experimental::detail::IncludeFiles> (base) (empty)
31+
// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::property_key_base_tag (base) (empty)
32+
// CHECK-NEXT: 0 | class std::vector<struct std::pair<class std::basic_string<char>, class std::basic_string<char> > > record
33+
// CHECK-NEXT: 0 | struct std::_Vector_base<struct std::pair<class std::basic_string<char>, class std::basic_string<char> >, class std::allocator<struct std::pair<class std::basic_string<char>, class std::basic_string<char> > > > (base)
34+
// CHECK-NEXT: 0 | struct std::_Vector_base<struct std::pair<class std::basic_string<char>, class std::basic_string<char> >, class std::allocator<struct std::pair<class std::basic_string<char>, class std::basic_string<char> > > >::_Vector_impl _M_impl
35+
// CHECK-NEXT: 0 | class std::allocator<struct std::pair<class std::basic_string<char>, class std::basic_string<char> > > (base) (empty)
36+
// CHECK-NEXT: 0 | class {{(std|__gnu_cxx)}}::__new_allocator<struct std::pair<class std::basic_string<char>, class std::basic_string<char> > > (base) (empty)
37+
// CHECK-NEXT: 0 | struct std::_Vector_base<struct std::pair<class std::basic_string<char>, class std::basic_string<char> >, class std::allocator<struct std::pair<class std::basic_string<char>, class std::basic_string<char> > > >::_Vector_impl_data (base)
38+
39+
40+
// CHECK: 0 | struct sycl::ext::oneapi::experimental::registered_kernel_names
41+
// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::run_time_property_key<sycl::ext::oneapi::experimental::detail::RegisteredKernelNames> (base) (empty)
42+
// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::property_key_base_tag (base) (empty)
43+
// CHECK-NEXT: 0 | class std::vector<class std::basic_string<char> > kernel_names
44+
// CHECK-NEXT: 0 | struct std::_Vector_base<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > > (base)
45+
// CHECK-NEXT: 0 | struct std::_Vector_base<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > >::_Vector_impl _M_impl
46+
// CHECK-NEXT: 0 | class std::allocator<class std::basic_string<char> > (base) (empty)
47+
// CHECK-NEXT: 0 | class {{(std|__gnu_cxx)}}::__new_allocator<class std::basic_string<char> > (base) (empty)
48+
// CHECK-NEXT: 0 | struct std::_Vector_base<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > >::_Vector_impl_data (base)
1949

2050
#include <sycl/sycl.hpp>

0 commit comments

Comments
 (0)