Skip to content

Commit 852bcf0

Browse files
committed
Fix clang format issues
Signed-off-by: Soumi Manna <[email protected]>
1 parent e4424de commit 852bcf0

File tree

5 files changed

+9
-18
lines changed

5 files changed

+9
-18
lines changed

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,8 +751,8 @@ void CodeGenFunction::EmitOpenCLKernelMetadata(const FunctionDecl *FD,
751751
llvm::ConstantAsMetadata::get(Builder.getInt(*A->getYDimVal())),
752752
llvm::ConstantAsMetadata::get(Builder.getInt(*A->getXDimVal()))};
753753
Fn->setMetadata("max_work_group_size",
754-
llvm::MDNode::get(Context, AttrMDArgs));
755-
}
754+
llvm::MDNode::get(Context, AttrMDArgs));
755+
}
756756
}
757757

758758
if (const auto *A = FD->getAttr<SYCLIntelNoGlobalWorkOffsetAttr>()) {

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3580,9 +3580,9 @@ SYCLIntelMaxWorkGroupSizeAttr *Sema::MergeSYCLIntelMaxWorkGroupSizeAttr(
35803580
(DeclXDimExpr->getResultAsAPSInt() != 1 ||
35813581
DeclYDimExpr->getResultAsAPSInt() != 1 ||
35823582
DeclZDimExpr->getResultAsAPSInt() != 1)) {
3583-
Diag(A.getLoc(), diag::err_sycl_x_y_z_arguments_must_be_one)
3583+
Diag(A.getLoc(), diag::err_sycl_x_y_z_arguments_must_be_one)
35843584
<< &A << DeclAttr;
3585-
return nullptr;
3585+
return nullptr;
35863586
}
35873587
}
35883588
}
@@ -3594,8 +3594,6 @@ SYCLIntelMaxWorkGroupSizeAttr *Sema::MergeSYCLIntelMaxWorkGroupSizeAttr(
35943594
// Handles max_work_group_size.
35953595
static void handleSYCLIntelMaxWorkGroupSize(Sema &S, Decl *D,
35963596
const ParsedAttr &AL) {
3597-
S.CheckDeprecatedSYCLAttributeSpelling(AL);
3598-
35993597
S.AddSYCLIntelMaxWorkGroupSizeAttr(D, AL, AL.getArgAsExpr(0),
36003598
AL.getArgAsExpr(1), AL.getArgAsExpr(2));
36013599
}

clang/test/SemaSYCL/intel-max-global-work-dim-device.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,7 @@ struct TRIFuncObjGood9 {
106106
operator()() const;
107107
};
108108

109-
[[intel::max_global_work_dim(1)]]
110-
void TRIFuncObjGood9::operator()() const {}
111-
112-
109+
[[intel::max_global_work_dim(1)]] void TRIFuncObjGood9::operator()() const {}
113110

114111
// FIXME: We do not have support yet for checking
115112
// max_work_group_size and max_global_work_dim
@@ -232,9 +229,7 @@ struct TRIFuncObjBad15 {
232229
operator()() const;
233230
};
234231

235-
[[intel::max_global_work_dim(0)]]
236-
void TRIFuncObjBad15::operator()() const {}
237-
232+
[[intel::max_global_work_dim(0)]] void TRIFuncObjBad15::operator()() const {}
238233
#endif // TRIGGER_ERROR
239234

240235
int main() {

clang/test/SemaSYCL/intel-max-work-group-size.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
[[intel::max_work_group_size(32, 32, 32)]] void f4() {} // expected-warning {{attribute 'max_work_group_size' is already applied with different arguments}} \
2020
2121
[[intel::max_work_group_size(6, 6, 6)]] // expected-note {{previous attribute is here}}
22-
[[intel::max_work_group_size(16, 16, 16)]] void // expected-warning {{attribute 'max_work_group_size' is already applied with different arguments}}
22+
[[intel::max_work_group_size(16, 16, 16)]] void // expected-warning {{attribute 'max_work_group_size' is already applied with different arguments}}
2323
f5() {}
2424

2525
[[intel::max_work_group_size(2, 2, 2)]] void f6(); // expected-note {{previous attribute is here}}

clang/test/SemaSYCL/sycl-device-intel-max-global-work-dim-template.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ template <int size>
7474
// ensure that if max_work_group_size and reqd_work_group_size attributes exist,
7575
// they hold equal values (1, 1, 1).
7676

77-
//TODO: Test case compiles now without any diagnostic but it shouldn't.
77+
// TODO: Test case compiles now without any diagnostic but it shouldn't.
7878
template <int N>
7979
[[intel::max_work_group_size(N, N, N)]] void func5(); // OK now. Error is expected here.
8080
template <int N>
@@ -143,9 +143,7 @@ int check() {
143143
}
144144

145145
// No diagnostic is emitted because the arguments match. Duplicate attribute is silently ignored.
146-
[[intel::max_global_work_dim(2)]]
147-
[[intel::max_global_work_dim(2)]] void func15() {}
148-
146+
[[intel::max_global_work_dim(2)]] [[intel::max_global_work_dim(2)]] void func15() {}
149147
// CHECK: FunctionDecl {{.*}} {{.*}} func3 'void ()'
150148
// CHECK: TemplateArgument integral 3
151149
// CHECK: SYCLIntelMaxGlobalWorkDimAttr {{.*}}

0 commit comments

Comments
 (0)