Skip to content

Commit 1673166

Browse files
committed
[SYCL][E2E] Fix narrowing conversions warning
llvm/llvm-project#75332 diagnoses narrowing conversions involving const references Also fix warning in 211 ../sycl/test-e2e/Basic/swizzle_op.cpp:211:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
1 parent a998806 commit 1673166

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/test-e2e/Basic/swizzle_op.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ int main() {
208208
abc.y() = cba.s1();
209209
abc.z() = cba.s2();
210210
abc.w() = cba.s3();
211-
if ((cba.x() == abc.x())) {
211+
if (cba.x() == abc.x()) {
212212
abc.xy() = abc.xy() * 3;
213213

214214
B[0] = abc.x();
@@ -262,7 +262,7 @@ int main() {
262262
myQueue.submit([&](handler &cgh) {
263263
auto B = b.get_access<access::mode::read_write>(cgh);
264264
cgh.parallel_for<class test_10>(
265-
range<1>{2}, [=](id<1> ID) { B[ID] = int3{ID[0]} / B[ID]; });
265+
range<1>{2}, [=](id<1> ID) { B[ID] = int3{(int3)ID[0]} / B[ID]; });
266266
});
267267
}
268268
assert(FF[0] == 0);

0 commit comments

Comments
 (0)