Skip to content

Commit 39bb37f

Browse files
committed
Fix format errors
Signed-off-by: Soumi Manna <[email protected]>
1 parent 9eee41c commit 39bb37f

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3451,13 +3451,13 @@ static void handleWorkGroupSizeHint(Sema &S, Decl *D, const ParsedAttr &AL) {
34513451
}
34523452

34533453
// Handles max_work_group_size attribute.
3454-
// Returns a OneArgResult value; EqualToOne means all argument values are
3454+
// Returns a AttrArgResult value; EqualToOne means all argument values are
34553455
// equal to one, NotEqualToOne means at least one argument value is not
34563456
// equal to one, and Unknown means that at least one of the argument values
34573457
// could not be determined.
34583458
enum class AttrArgResult { Unknown, EqualToOne, NotEqualToOne };
34593459
static AttrArgResult AreAllAttrArgsOne(const Expr *E, const Expr *E1,
3460-
const Expr *E2, const Expr *E3) {
3460+
const Expr *E2, const Expr *E3) {
34613461
// If any of the operand is still value dependent, we can't test anything.
34623462
const auto *CE = dyn_cast<ConstantExpr>(E);
34633463
const auto *CE1 = dyn_cast<ConstantExpr>(E1);
@@ -3467,10 +3467,9 @@ static AttrArgResult AreAllAttrArgsOne(const Expr *E, const Expr *E1,
34673467
if (!CE || !CE1 || !CE2 || !CE3)
34683468
return AttrArgResult::Unknown;
34693469

3470-
// Otherwise, test that the values.
3470+
// Otherwise, test that the attribute values.
34713471
if (CE->getResultAsAPSInt() == 0 &&
3472-
(CE1->getResultAsAPSInt() != 1 ||
3473-
CE2->getResultAsAPSInt() != 1 ||
3472+
(CE1->getResultAsAPSInt() != 1 || CE2->getResultAsAPSInt() != 1 ||
34743473
CE3->getResultAsAPSInt() != 1)) {
34753474
return AttrArgResult::NotEqualToOne;
34763475
}
@@ -3585,9 +3584,8 @@ SYCLIntelMaxWorkGroupSizeAttr *Sema::MergeSYCLIntelMaxWorkGroupSizeAttr(
35853584
// (1, 1, 1) in case the value of SYCLIntelMaxGlobalWorkDimAttr
35863585
// equals to 0.
35873586
if (const auto *DeclAttr = D->getAttr<SYCLIntelMaxGlobalWorkDimAttr>()) {
3588-
AttrArgResult Results[] = {
3589-
AreAllAttrArgsOne(DeclAttr->getValue(), A.getXDim(), A.getYDim(),
3590-
A.getZDim())};
3587+
AttrArgResult Results[] = {AreAllAttrArgsOne(
3588+
DeclAttr->getValue(), A.getXDim(), A.getYDim(), A.getZDim())};
35913589

35923590
if (llvm::is_contained(Results, AttrArgResult::NotEqualToOne)) {
35933591
Diag(A.getLoc(), diag::err_sycl_x_y_z_arguments_must_be_one)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int check() {
127127
func3<3>(); // OK
128128
func3<-1>(); // expected-note {{in instantiation of function template specialization 'func3<-1>' requested here}}
129129
func4<2>(); // expected-note {{in instantiation of function template specialization 'func4<2>' requested here}}
130-
func5<6>(); // expected-note {{in instantiation of function template specialization 'func5<6>' requested here}}
130+
func5<2>(); // expected-note {{in instantiation of function template specialization 'func5<2>' requested here}}
131131
func6<2>(); // expected-note {{in instantiation of function template specialization 'func6<2>' requested here}}
132132
func7<2>(); // expected-note {{in instantiation of function template specialization 'func7<2>' requested here}}
133133
func8<2>(); // expected-note {{in instantiation of function template specialization 'func8<2>' requested here}}

0 commit comments

Comments
 (0)