Skip to content

Commit 6761e73

Browse files
authored
[SYCL] Re-enable SemaSYCL/sycl-dllimport-dllexport (#4842)
The test was XFAIL-ed after pulldown some time ago. This fixes #2758
1 parent 7dc8274 commit 6761e73

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clang/test/SemaSYCL/sycl-dllimport-dllexport.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// XFAIL: *
21
// RUN: %clang_cc1 -triple spir64-unknown-unknown -fms-extensions \
32
// RUN: -aux-triple x86_64-unknown-linux-gnu -fsycl-is-device \
43
// RUN: -fsyntax-only -Wno-sycl-2017-compat -DWARNCHECK %s -o /dev/null 2>&1 | FileCheck %s
54
// check random triple aux-triple with sycl-device
65

76
// RUN: %clang_cc1 -triple spir64-unknown-windows -Wno-sycl-2017-compat -fsyntax-only \
8-
// RUN: -fms-extensions -DWARNCHECK %s -o /dev/null 2>&1 | FileCheck %s
7+
// RUN: -fms-extensions -DWARNCHECK %s -o /dev/null 2>&1 | FileCheck --check-prefixes CHECKALL %s
98
// check without -aux-triple but sycl-device
109

1110
// RUN: %clang_cc1 -triple spir64-unknown-windows \
@@ -43,10 +42,9 @@ int __declspec(dllexport) foo(int a) {
4342
}
4443
// expected-note@+1 {{'bar' declared here}}
4544
SYCL_EXTERNAL int __declspec(dllimport) bar();
46-
// expected-note@+2 {{previous attribute is here}}
4745
// expected-note@+1 {{previous declaration is here}}
48-
int __declspec(dllimport) foobar();
49-
int foobar() // expected-warning {{'foobar' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
46+
int __declspec(dllimport) foobar(); // expected-note {{'foobar' declared here}}
47+
int foobar() // expected-warning {{'foobar' redeclared without 'dllimport' attribute: 'dllexport' attribute added}}
5048
{
5149
return 10;
5250
}
@@ -62,7 +60,7 @@ int main() {
6260
kernel_single_task<class fake_kernel>([]() {
6361
foo(10);// expected-no-error
6462
bar(); // expected-error {{SYCL kernel cannot call a dllimport function}}
65-
foobar(); // expected-no-error
63+
foobar(); // expected-error {{SYCL kernel cannot call a dllimport function}}
6664
});
6765
bar(); // expected-no-error
6866
return 0;

0 commit comments

Comments
 (0)