File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
2+
3+ // expected-warning@+1{{'sycl_external' attribute only applies to functions}}
4+ [[clang::sycl_external]] int a;
5+
6+
7+ // expected-warning@+2{{'sycl_external' attribute only applies to functions}}
8+ struct s {
9+ [[clang::sycl_external]] int b;
10+ };
11+
12+ // FIXME: The first declaration of a function is required to have the attribute.
13+ // The attribute may be optionally present on subsequent declarations
14+ int foo (int c);
15+
16+ [[clang::sycl_external]] void foo ();
Original file line number Diff line number Diff line change 1+ // RUN: %clang_cc1 -fsyntax-only -verify %s
2+
3+ // expected-warning@+1{{'sycl_external' attribute ignored}}
4+ [[clang::sycl_external]] void bar () {}
5+
6+ // expected-warning@+1{{'sycl_external' attribute ignored}}
7+ [[clang::sycl_external]] int a;
8+
9+ // expected-warning@+2{{'sycl_external' attribute ignored}}
10+ namespace not_sycl {
11+ [[clang::sycl_external]] void foo () {}
12+ }
You can’t perform that action at this time.
0 commit comments