Skip to content

Commit e425d2a

Browse files
[SYCL] Silence warnings for #warning directive in CL/sycl.hpp (#13602)
Fixes #13592. Also update unittests not to use the deprecated header file.
1 parent 94e6d19 commit e425d2a

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

sycl/include/CL/sycl.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
#pragma once
1010

1111
#if defined(__clang__)
12+
#pragma clang diagnostic push
13+
#pragma clang diagnostic ignored "-Wpedantic"
1214
#warning "CL/sycl.hpp is deprecated, use sycl/sycl.hpp"
15+
#pragma clang diagnostic pop
1316
#endif
1417

1518
#include <sycl/sycl.hpp>

sycl/test/warnings/sycl_2020_deprecations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clangxx %fsycl-host-only -fsyntax-only -ferror-limit=0 -sycl-std=2020 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s
22

3-
// expected-warning@sycl/CL/sycl.hpp:12 {{CL/sycl.hpp is deprecated, use sycl/sycl.hpp}}
3+
// expected-warning@sycl/CL/sycl.hpp:* {{CL/sycl.hpp is deprecated, use sycl/sycl.hpp}}
44
#include <CL/sycl.hpp>
55
#include <sycl/ext/intel/experimental/online_compiler.hpp>
66

sycl/unittests/SYCL2020/AtomicFenceCapabilities.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include <CL/sycl.hpp>
9+
#include <sycl/sycl.hpp>
1010
#include <gtest/gtest.h>
1111
#include <helpers/PiMock.hpp>
1212

sycl/unittests/SYCL2020/AtomicMemoryScopeCapabilities.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include <CL/sycl.hpp>
9+
#include <sycl/sycl.hpp>
1010
#include <gtest/gtest.h>
1111
#include <helpers/PiMock.hpp>
1212

sycl/unittests/queue/DeviceCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include <CL/sycl.hpp>
9+
#include <sycl/sycl.hpp>
1010
#include <detail/config.hpp>
1111
#include <detail/device_impl.hpp>
1212
#include <gtest/gtest.h>

0 commit comments

Comments
 (0)