File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -verify %s
2
2
// RUN: %clang_cc1 -verify -DNO_SYCL %s
3
3
4
- // RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -verify -DNOT_STRICT -Wno-error=sycl-strict -Wno-sycl-strict %s
5
- // RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -verify -DWARN_STRICT -Wno-error=sycl-strict %s
6
-
7
4
#ifndef NO_SYCL
8
5
9
6
__attribute__ ((sycl_device)) // expected-warning {{'sycl_device' attribute only applies to functions}}
@@ -34,21 +31,17 @@ class B {
34
31
__attribute__ ((sycl_device)) virtual void bar () = 0;
35
32
};
36
33
37
- #if defined(NOT_STRICT)
38
- __attribute__ ((sycl_device))
39
- int* func3() { return nullptr ; }
34
+ __attribute__ ((sycl_device)) int *func0() { return nullptr ; }
40
35
41
- __attribute__ ((sycl_device))
42
- void func3(int *) {}
43
- #elif defined(WARN_STRICT)
44
- __attribute__ ((sycl_device)) int *func3() { return nullptr ; }
36
+ __attribute__ ((sycl_device)) void func2(int *) {}
45
37
46
- __attribute__ ((sycl_device)) void func3(int *) {}
47
- #else
48
38
__attribute__ ((sycl_device)) int *func3() { return nullptr ; }
49
39
50
- __attribute__ ((sycl_device)) void func3(int *) {}
51
- #endif
40
+ __attribute__ ((sycl_device)) void func4(int *) {}
41
+
42
+ __attribute__ ((sycl_device)) int *func5() { return nullptr ; }
43
+
44
+ __attribute__ ((sycl_device)) void func6(int *) {}
52
45
53
46
#else // NO_SYCL
54
47
__attribute__ ((sycl_device)) // expected-warning {{'sycl_device' attribute ignored}}
You can’t perform that action at this time.
0 commit comments