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 @@ -223,6 +223,15 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase<device> {
223
223
// / \return the backend associated with this device.
224
224
backend get_backend () const noexcept ;
225
225
226
+ // Clang may warn about the use of diagnose_if in __SYCL_WARN_IMAGE_ASPECT, so
227
+ // we disable that warning as we make appropriate checks to ensure its
228
+ // existence.
229
+ // TODO: Remove this diagnostics when __SYCL_WARN_IMAGE_ASPECT is removed.
230
+ #if defined(__clang__)
231
+ #pragma clang diagnostic push
232
+ #pragma clang diagnostic ignored "-Wgcc-compat"
233
+ #endif // defined(__clang__)
234
+
226
235
// / Indicates if the SYCL device has the given feature.
227
236
// /
228
237
// / \param Aspect is one of the values in Table 4.20 of the SYCL 2020
@@ -231,6 +240,11 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase<device> {
231
240
// / \return true if the SYCL device has the given feature.
232
241
bool has (aspect Aspect) const __SYCL_WARN_IMAGE_ASPECT(Aspect);
233
242
243
+ // TODO: Remove this diagnostics when __SYCL_WARN_IMAGE_ASPECT is removed.
244
+ #if defined(__clang__)
245
+ #pragma clang diagnostic pop
246
+ #endif // defined(__clang__)
247
+
234
248
private:
235
249
std::shared_ptr<detail::device_impl> impl;
236
250
device (std::shared_ptr<detail::device_impl> impl) : impl(impl) {}
Original file line number Diff line number Diff line change @@ -141,6 +141,15 @@ class __SYCL_EXPORT platform : public detail::OwnerLessBase<platform> {
141
141
// / \return the backend associated with this platform
142
142
backend get_backend () const noexcept ;
143
143
144
+ // Clang may warn about the use of diagnose_if in __SYCL_WARN_IMAGE_ASPECT, so
145
+ // we disable that warning as we make appropriate checks to ensure its
146
+ // existence.
147
+ // TODO: Remove this diagnostics when __SYCL_WARN_IMAGE_ASPECT is removed.
148
+ #if defined(__clang__)
149
+ #pragma clang diagnostic push
150
+ #pragma clang diagnostic ignored "-Wgcc-compat"
151
+ #endif // defined(__clang__)
152
+
144
153
// / Indicates if all of the SYCL devices on this platform have the
145
154
// / given feature.
146
155
// /
@@ -151,6 +160,11 @@ class __SYCL_EXPORT platform : public detail::OwnerLessBase<platform> {
151
160
// / given feature.
152
161
bool has (aspect Aspect) const __SYCL_WARN_IMAGE_ASPECT(Aspect);
153
162
163
+ // TODO: Remove this diagnostics when __SYCL_WARN_IMAGE_ASPECT is removed.
164
+ #if defined(__clang__)
165
+ #pragma clang diagnostic pop
166
+ #endif // defined(__clang__)
167
+
154
168
// / Return this platform's default context
155
169
// /
156
170
// / \return the default context
You can’t perform that action at this time.
0 commit comments