Skip to content

Commit 5ee02a1

Browse files
committed
Fix format
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
1 parent cae62f2 commit 5ee02a1

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5798,7 +5798,7 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) {
57985798
if (getTriple().isNVPTX() || getTriple().isAMDGPU()) {
57995799
const RecordDecl *RD = D->getType()->getAsRecordDecl();
58005800
if (RD && RD->hasAttr<SYCLDeviceConstantAttr>()) {
5801-
return LangAS::opencl_constant;
5801+
return LangAS::opencl_constant;
58025802
}
58035803
}
58045804
}

sycl/include/sycl/ext/oneapi/device_global/device_global.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,34 +224,34 @@ class
224224
\
225225
template <class RelayT = T> \
226226
std::remove_reference_t< \
227-
decltype(std::declval<RelayT>()[std::declval<std::ptrdiff_t>()])> \
228-
&operator[](std::ptrdiff_t idx) noexcept { \
227+
decltype(std::declval<RelayT>()[std::declval<std::ptrdiff_t>()])> & \
228+
operator[](std::ptrdiff_t idx) noexcept { \
229229
__SYCL_HOST_NOT_SUPPORTED("Subscript operator") \
230230
return (*this->get_ptr())[idx]; \
231231
} \
232232
\
233233
template <class RelayT = T> \
234234
const std::remove_reference_t< \
235-
decltype(std::declval<RelayT>()[std::declval<std::ptrdiff_t>()])> \
236-
&operator[](std::ptrdiff_t idx) const noexcept { \
235+
decltype(std::declval<RelayT>()[std::declval<std::ptrdiff_t>()])> & \
236+
operator[](std::ptrdiff_t idx) const noexcept { \
237237
__SYCL_HOST_NOT_SUPPORTED("Subscript operator") \
238238
return (*this->get_ptr())[idx]; \
239239
} \
240240
\
241241
template <class RelayT = T> \
242242
std::enable_if_t<detail::HasArrowOperator<RelayT>::value || \
243243
std::is_pointer_v<RelayT>, \
244-
RelayT> \
245-
&operator->() noexcept { \
244+
RelayT> & \
245+
operator->() noexcept { \
246246
__SYCL_HOST_NOT_SUPPORTED("operator-> on a device_global") \
247247
return *this->get_ptr(); \
248248
} \
249249
\
250250
template <class RelayT = T> \
251251
std::enable_if_t<detail::HasArrowOperator<RelayT>::value || \
252252
std::is_pointer_v<RelayT>, \
253-
const RelayT> \
254-
&operator->() const noexcept { \
253+
const RelayT> & \
254+
operator->() const noexcept { \
255255
__SYCL_HOST_NOT_SUPPORTED("operator-> on a device_global") \
256256
return *this->get_ptr(); \
257257
} \

sycl/include/sycl/ext/oneapi/device_global/properties.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
#pragma once
1010

11+
#include <sycl/ext/oneapi/properties/properties.hpp> // for empty_properties_t
1112
#include <sycl/ext/oneapi/properties/property.hpp> // for PropKind
1213
#include <sycl/ext/oneapi/properties/property_value.hpp> // for property_value
13-
#include <sycl/ext/oneapi/properties/properties.hpp> // for empty_properties_t
1414

1515
#include <cstdint> // for uint16_t
1616
#include <iosfwd> // for nullptr_t
@@ -20,14 +20,16 @@ namespace sycl {
2020
inline namespace _V1 {
2121
namespace ext::oneapi::experimental {
2222

23-
template <typename T, typename PropertyListT = empty_properties_t, typename = void> class device_global;
23+
template <typename T, typename PropertyListT = empty_properties_t,
24+
typename = void>
25+
class device_global;
2426

2527
struct device_image_scope_key
2628
: detail::compile_time_property_key<detail::PropKind::DeviceImageScope> {
2729
using value_t = property_value<device_image_scope_key>;
2830
};
2931

30-
struct device_constant_key {
32+
struct device_constant_key
3133
: detail::compile_time_property_key<detail::PropKind::DeviceConstant> {
3234
using value_t = property_value<device_constant_key>;
3335
};
@@ -88,8 +90,8 @@ template <typename T, typename PropertyListT>
8890
struct is_property_key_of<device_image_scope_key,
8991
device_global<T, PropertyListT>> : std::true_type {};
9092
template <typename T, typename PropertyListT>
91-
struct is_property_key_of<device_constant_key,
92-
device_global<T, PropertyListT>> : std::true_type {};
93+
struct is_property_key_of<device_constant_key, device_global<T, PropertyListT>>
94+
: std::true_type {};
9395
template <typename T, typename PropertyListT>
9496
struct is_property_key_of<host_access_key, device_global<T, PropertyListT>>
9597
: std::true_type {};

0 commit comments

Comments
 (0)