Skip to content

Commit 49dce75

Browse files
committed
Apply clang-format + some fixes
Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
1 parent a350e20 commit 49dce75

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3084,8 +3084,7 @@ static void handleMaxGlobalWorkDimAttr(Sema &S, Decl *D,
30843084

30853085
// Handles kernel_arg_buffer_location attr.
30863086
static void handleBufferLocationAttr(Sema &S, Decl *D, const ParsedAttr &Attr) {
3087-
S.Diag(Attr.getLoc(), diag::warn_sycl_implicit_attr_usage)
3088-
<< Attr;
3087+
S.Diag(Attr.getLoc(), diag::warn_sycl_implicit_attr_usage) << Attr;
30893088
}
30903089

30913090
static void handleVecTypeHint(Sema &S, Decl *D, const ParsedAttr &AL) {

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,14 +1224,13 @@ class SyclKernelDeclCreator : public SyclKernelFieldHandler {
12241224
// is going to be for other compile time known accessor properties, hence
12251225
// it's not clear, how handle them in SemaSYCL. But in general property_list
12261226
// is a parameter pack and shall be handled appropriately.
1227-
const auto Prop =
1228-
cast<TemplateArgument>(AccTy->getTemplateArgs()[5]);
1227+
const auto Prop = cast<TemplateArgument>(AccTy->getTemplateArgs()[5]);
12291228
QualType PropTy = Prop.getAsType();
12301229
if (!Util::isSyclBufferLocation(PropTy))
12311230
return -1;
12321231

1233-
const auto *PropDecl = cast<ClassTemplateSpecializationDecl>(
1234-
PropTy->getAsRecordDecl());
1232+
const auto *PropDecl =
1233+
cast<ClassTemplateSpecializationDecl>(PropTy->getAsRecordDecl());
12351234
return static_cast<int>(
12361235
PropDecl->getTemplateArgs()[0].getAsIntegral().getExtValue());
12371236
}

clang/test/CodeGenSYCL/Inputs/sycl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ enum prop_type {
7575
// TODO: this doesn't belong to property namespace, instead it shall be in its
7676
// own namespace. Change it, when the actual implementation in SYCL headers is
7777
// ready
78-
template<int>
78+
template <int>
7979
class buffer_location {};
8080

8181
struct property_base {
8282
virtual prop_type type() const = 0;
8383
};
8484
} // namespace property
8585

86-
template<typename... properties>
86+
template <typename... properties>
8787
class property_list {
8888
public:
8989
property_list(properties... props) {}

clang/test/CodeGenSYCL/buffer_location.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ int main() {
99
cl::sycl::accessor<int, 1, cl::sycl::access::mode::read_write,
1010
cl::sycl::access::target::global_buffer,
1111
cl::sycl::access::placeholder::false_t,
12-
cl::sycl::property::buffer_location<3>> accessorA;
12+
cl::sycl::property::buffer_location<3>>
13+
accessorA;
1314
cl::sycl::kernel_single_task<class kernel_function>(
1415
[=]() {
1516
accessorA.use();

clang/test/SemaSYCL/intel-kernel-arg-buffer-location.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#ifdef CHECKDIAG
99
struct FuncObj {
1010
[[intelfpga::kernel_arg_buffer_location]] // expected-warning{{'kernel_arg_buffer_location' attribute cannot be used explicitly}}
11-
void operator()() {}
11+
void
12+
operator()() {}
1213
};
1314

1415
template <typename name, typename Func>

0 commit comments

Comments
 (0)