Skip to content

Commit c692020

Browse files
committed
Make clang-format happy again
1 parent 837f781 commit c692020

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
__SYCL_INLINE_NAMESPACE(cl) {
2-
namespace sycl {
3-
namespace detail {
2+
namespace sycl {
3+
namespace detail {
44

55
#if __cplusplus >= 201703L
6-
// Translates SYCL 2020 `specialization_id` to a unique symbolic identifier
7-
// which is used internally by the toolchain
8-
template <auto &SpecName> const char *get_spec_constant_symbolic_ID() {
9-
return get_spec_constant_symbolic_ID_impl<SpecName>();
10-
}
6+
// Translates SYCL 2020 `specialization_id` to a unique symbolic identifier
7+
// which is used internally by the toolchain
8+
template <auto &SpecName> const char *get_spec_constant_symbolic_ID() {
9+
return get_spec_constant_symbolic_ID_impl<SpecName>();
10+
}
1111
#endif
1212

13-
} // namespace detail
14-
} // namespace sycl
13+
} // namespace detail
14+
} // namespace sycl
1515
} // __SYCL_INLINE_NAMESPACE(cl)

clang/test/CodeGenSYCL/device_globals_with_spec_ids.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ sycl::ext::oneapi::device_global<int> b;
7272
// CHECK-NEXT: return a;
7373
// CHECK-NEXT: }
7474
// CHECK-NEXT: } // namespace __sycl_detail
75-
// CHECK-NEXT: } // namespace
75+
// CHECK-NEXT: } // namespace
7676

7777
// CHECK: __SYCL_INLINE_NAMESPACE(cl) {
7878
// CHECK-NEXT: namespace sycl {
@@ -91,7 +91,7 @@ sycl::ext::oneapi::device_global<int> b;
9191
// CHECK-NEXT: return b;
9292
// CHECK-NEXT: }
9393
// CHECK-NEXT: } // namespace __sycl_detail
94-
// CHECK-NEXT: } // namespace
94+
// CHECK-NEXT: } // namespace
9595

9696
namespace outer {
9797
namespace {
@@ -107,9 +107,9 @@ constexpr sycl::specialization_id a{2};
107107
// CHECK-NEXT: return a;
108108
// CHECK-NEXT: }
109109
// CHECK-NEXT: } // namespace __sycl_detail
110-
// CHECK-NEXT: } // namespace
110+
// CHECK-NEXT: } // namespace
111111
// CHECK-NEXT: } // namespace inner
112-
// CHECK-NEXT: } // namespace
112+
// CHECK-NEXT: } // namespace
113113
// CHECK-NEXT: } // namespace outer
114114
// CHECK-NEXT: namespace outer {
115115
// CHECK-NEXT: namespace {
@@ -118,7 +118,7 @@ constexpr sycl::specialization_id a{2};
118118
// CHECK-NEXT: return inner::__sycl_detail::__shim_[[SHIM2]]();
119119
// CHECK-NEXT: }
120120
// CHECK-NEXT: } // namespace __sycl_detail
121-
// CHECK-NEXT: } // namespace
121+
// CHECK-NEXT: } // namespace
122122
// CHECK-NEXT: } // namespace outer
123123
// CHECK-NEXT: __SYCL_INLINE_NAMESPACE(cl) {
124124
// CHECK-NEXT: namespace sycl {
@@ -140,9 +140,9 @@ sycl::ext::oneapi::device_global<int> b;
140140
// CHECK-NEXT: return b;
141141
// CHECK-NEXT: }
142142
// CHECK-NEXT: } // namespace __sycl_detail
143-
// CHECK-NEXT: } // namespace
143+
// CHECK-NEXT: } // namespace
144144
// CHECK-NEXT: } // namespace inner
145-
// CHECK-NEXT: } // namespace
145+
// CHECK-NEXT: } // namespace
146146
// CHECK-NEXT: } // namespace outer
147147
// CHECK-NEXT: namespace outer {
148148
// CHECK-NEXT: namespace {
@@ -151,7 +151,7 @@ sycl::ext::oneapi::device_global<int> b;
151151
// CHECK-NEXT: return inner::__sycl_detail::__shim_[[SHIM4]]();
152152
// CHECK-NEXT: }
153153
// CHECK-NEXT: } // namespace __sycl_detail
154-
// CHECK-NEXT: } // namespace
154+
// CHECK-NEXT: } // namespace
155155
// CHECK-NEXT: } // namespace outer
156156
struct Wrapper {
157157
static constexpr sycl::specialization_id a{18};
@@ -167,9 +167,9 @@ struct Wrapper {
167167
// CHECK-NEXT: return Wrapper::a;
168168
// CHECK-NEXT: }
169169
// CHECK-NEXT: } // namespace __sycl_detail
170-
// CHECK-NEXT: } // namespace
170+
// CHECK-NEXT: } // namespace
171171
// CHECK-NEXT: } // namespace inner
172-
// CHECK-NEXT: } // namespace
172+
// CHECK-NEXT: } // namespace
173173
// CHECK-NEXT: } // namespace outer
174174
// CHECK-NEXT: namespace outer {
175175
// CHECK-NEXT: namespace {
@@ -178,7 +178,7 @@ struct Wrapper {
178178
// CHECK-NEXT: return inner::__sycl_detail::__shim_[[SHIM6]]();
179179
// CHECK-NEXT: }
180180
// CHECK-NEXT: } // namespace __sycl_detail
181-
// CHECK-NEXT: } // namespace
181+
// CHECK-NEXT: } // namespace
182182
// CHECK-NEXT: } // namespace outer
183183
// CHECK-NEXT: __SYCL_INLINE_NAMESPACE(cl) {
184184
// CHECK-NEXT: namespace sycl {
@@ -200,9 +200,9 @@ struct Wrapper {
200200
// CHECK-NEXT: return Wrapper::b;
201201
// CHECK-NEXT: }
202202
// CHECK-NEXT: } // namespace __sycl_detail
203-
// CHECK-NEXT: } // namespace
203+
// CHECK-NEXT: } // namespace
204204
// CHECK-NEXT: } // namespace inner
205-
// CHECK-NEXT: } // namespace
205+
// CHECK-NEXT: } // namespace
206206
// CHECK-NEXT: } // namespace outer
207207
// CHECK-NEXT: namespace outer {
208208
// CHECK-NEXT: namespace {
@@ -211,7 +211,7 @@ struct Wrapper {
211211
// CHECK-NEXT: return inner::__sycl_detail::__shim_[[SHIM8]]();
212212
// CHECK-NEXT: }
213213
// CHECK-NEXT: } // namespace __sycl_detail
214-
// CHECK-NEXT: } // namespace
214+
// CHECK-NEXT: } // namespace
215215
// CHECK-NEXT: } // namespace outer
216216
// CHECK-NEXT: namespace outer {
217217
// CHECK-NEXT: namespace {
@@ -222,9 +222,9 @@ struct Wrapper {
222222
// CHECK-NEXT: return Wrapper::c;
223223
// CHECK-NEXT: }
224224
// CHECK-NEXT: } // namespace __sycl_detail
225-
// CHECK-NEXT: } // namespace
225+
// CHECK-NEXT: } // namespace
226226
// CHECK-NEXT: } // namespace inner
227-
// CHECK-NEXT: } // namespace
227+
// CHECK-NEXT: } // namespace
228228
// CHECK-NEXT: } // namespace outer
229229
// CHECK-NEXT: namespace outer {
230230
// CHECK-NEXT: namespace {
@@ -233,7 +233,7 @@ struct Wrapper {
233233
// CHECK-NEXT: return inner::__sycl_detail::__shim_[[SHIM10]]();
234234
// CHECK-NEXT: }
235235
// CHECK-NEXT: } // namespace __sycl_detail
236-
// CHECK-NEXT: } // namespace
236+
// CHECK-NEXT: } // namespace
237237
// CHECK-NEXT: } // namespace outer
238238

239239
// FIXME: Shims don't work with templated wrapper classes for some reason
@@ -242,13 +242,13 @@ struct Wrapper {
242242
// static constexpr sycl::specialization_id<T> a{18};
243243
// static sycl::ext::oneapi::device_global<T> b;
244244
// };
245-
//
245+
//
246246
// template class TemplateWrapper<float>;
247247

248-
}
249-
}
250-
}
251-
}
248+
} // namespace
249+
} // namespace inner
250+
} // namespace
251+
} // namespace outer
252252

253253
// CHECK: #include <CL/sycl/detail/spec_const_integration.hpp>
254254
// CHECK-NEXT: #include <CL/sycl/detail/device_global_map.hpp>

0 commit comments

Comments
 (0)