File tree Expand file tree Collapse file tree 5 files changed +10
-12
lines changed
sycl/doc/extensions/experimental Expand file tree Collapse file tree 5 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -12491,7 +12491,7 @@ def err_sycl_wg_scope : Error<
1249112491 "SYCL work group scope only applies to class with a trivial "
1249212492 "%select{default constructor|destructor}0">;
1249312493def err_sycl_field_with_wg_scope : Error<
12494- "type with a SYCL work group scope attribute cannot be used with a non-static data members ">;
12494+ "non-static data member is of a type with a SYCL work group scope attribute applied to it ">;
1249512495def err_sycl_virtual_types : Error<
1249612496 "no class with a vtable can be used in a SYCL kernel or any code included in the kernel">;
1249712497def note_sycl_recursive_function_declared_here: Note<"function implemented using recursion declared here">;
Original file line number Diff line number Diff line change @@ -8665,12 +8665,9 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {
86658665 // ISO/IEC TR 18037 S5.1.2
86668666 if (!getLangOpts().OpenCL && NewVD->hasLocalStorage() &&
86678667 T.getAddressSpace() != LangAS::Default) {
8668- if (!getLangOpts().SYCLIsDevice &&
8669- T.getAddressSpace() != LangAS::sycl_local) {
8670- Diag(NewVD->getLocation(), diag::err_as_qualified_auto_decl) << 0;
8671- NewVD->setInvalidDecl();
8672- return;
8673- }
8668+ Diag(NewVD->getLocation(), diag::err_as_qualified_auto_decl) << 0;
8669+ NewVD->setInvalidDecl();
8670+ return;
86748671 }
86758672
86768673 // OpenCL v1.2 s6.8 - The static qualifier is valid only in program
Original file line number Diff line number Diff line change 1+ // Verify the use of wg_scope is correctly diagnosed.
12// RUN: %clang_cc1 -fsycl-is-device -verify %s
23
34class [[__sycl_detail__::wg_scope]] G1 {};
@@ -65,14 +66,14 @@ B12<Valid> b12;
6566B12<InvalidCtor> b13;
6667
6768class B14 {
68- G1 field; // expected-error {{type with a SYCL work group scope attribute cannot be used with a non-static data members }}
69+ G1 field; // expected-error {{non-static data member is of a type with a SYCL work group scope attribute applied to it }}
6970};
7071
7172template <typename T> class B15 {
7273 T field; // #B15-field
7374};
7475
75- // expected-error@#B15-field {{type with a SYCL work group scope attribute cannot be used with a non-static data members }}
76+ // expected-error@#B15-field {{non-static data member is of a type with a SYCL work group scope attribute applied to it }}
7677// expected-note@+1 {{in instantiation of template class 'B15<G1>' requested here}}
7778B15<G1> b15;
7879
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ then the implementation must throw a synchronous exception with the
151151local memory into account, whether via the `work_group_scratch_size` property
152152or other APIs such as `local_accessor`.
153153
154- === Example
154+ == Example
155155
156156[source,c++]
157157----
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ public:
116116} // namespace sycl::ext::oneapi::experimental
117117----
118118
119- `T` must be a cv-unqualified trivially constructible and trivially destructible.
119+ `T` must be cv-unqualified, trivially constructible and trivially destructible.
120120
121121The storage for the object is allocated in device local memory before
122122calling the user's kernel lambda, and deallocated when all work-items
@@ -188,7 +188,7 @@ then the implementation must throw a synchronous exception with the
188188local memory into account, whether via the `work_group_scratch_size` property
189189or other APIs such as `local_accessor`.
190190
191- === Example
191+ == Example
192192
193193[source,c++]
194194----
You can’t perform that action at this time.
0 commit comments