Skip to content

Commit

Permalink
[SYCL] Silence warnings for #warning directive in CL/sycl.hpp (#1…
Browse files Browse the repository at this point in the history
…3602)

Fixes #13592. Also update unittests
not to use the deprecated header file.
  • Loading branch information
aelovikov-intel authored Apr 30, 2024
1 parent 94e6d19 commit e425d2a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions sycl/include/CL/sycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
#pragma once

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpedantic"
#warning "CL/sycl.hpp is deprecated, use sycl/sycl.hpp"
#pragma clang diagnostic pop
#endif

#include <sycl/sycl.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/warnings/sycl_2020_deprecations.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clangxx %fsycl-host-only -fsyntax-only -ferror-limit=0 -sycl-std=2020 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s

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

Expand Down
2 changes: 1 addition & 1 deletion sycl/unittests/SYCL2020/AtomicFenceCapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include <CL/sycl.hpp>
#include <sycl/sycl.hpp>
#include <gtest/gtest.h>
#include <helpers/PiMock.hpp>

Expand Down
2 changes: 1 addition & 1 deletion sycl/unittests/SYCL2020/AtomicMemoryScopeCapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include <CL/sycl.hpp>
#include <sycl/sycl.hpp>
#include <gtest/gtest.h>
#include <helpers/PiMock.hpp>

Expand Down
2 changes: 1 addition & 1 deletion sycl/unittests/queue/DeviceCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include <CL/sycl.hpp>
#include <sycl/sycl.hpp>
#include <detail/config.hpp>
#include <detail/device_impl.hpp>
#include <gtest/gtest.h>
Expand Down

0 comments on commit e425d2a

Please sign in to comment.