Skip to content

Commit 4e1220a

Browse files
Fix incorrect merge conflict resolution and ClangFormat error
Signed-off-by: Elizabeth Andrews <[email protected]>
1 parent ed4d2f5 commit 4e1220a

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,11 +1246,6 @@ class SyclKernelDeclCreator
12461246
return true;
12471247
}
12481248

1249-
// FIXME Remove this function when structs are replaced by their fields
1250-
bool handleStructType(FieldDecl *FD, QualType FieldTy) final {
1251-
return true;
1252-
}
1253-
12541249
bool handleSyclHalfType(FieldDecl *FD, QualType FieldTy) final {
12551250
addParam(FD, FieldTy);
12561251
return true;
@@ -1568,11 +1563,6 @@ class SyclKernelBodyCreator
15681563
return true;
15691564
}
15701565

1571-
// FIXME Remove this function when structs are replaced by their fields
1572-
bool handleStructType(FieldDecl *FD, QualType FieldTy) final {
1573-
return true;
1574-
}
1575-
15761566
bool handleScalarType(FieldDecl *FD, QualType FieldTy) final {
15771567
if (dyn_cast<ArraySubscriptExpr>(MemberExprBases.back()))
15781568
createExprForScalarElement(FD);
@@ -1581,8 +1571,6 @@ class SyclKernelBodyCreator
15811571
return true;
15821572
}
15831573

1584-
bool enterStruct(const CXXRecordDecl *, FieldDecl *FD) final {}
1585-
15861574
bool enterStruct(const CXXRecordDecl *RD, const CXXBaseSpecifier &BS) final {
15871575
CXXCastPath BasePath;
15881576
QualType DerivedTy(RD->getTypeForDecl(), 0);
@@ -1594,6 +1582,7 @@ class SyclKernelBodyCreator
15941582
SemaRef.Context, BaseTy, CK_DerivedToBase, MemberExprBases.back(),
15951583
/* CXXCastPath=*/&BasePath, VK_LValue);
15961584
MemberExprBases.push_back(Cast);
1585+
return true;
15971586
}
15981587

15991588
void addStructInit(const CXXRecordDecl *RD) {
@@ -1633,12 +1622,14 @@ class SyclKernelBodyCreator
16331622
InitExprs.pop_back();
16341623
}
16351624
}
1625+
return true;
16361626
}
16371627

16381628
bool leaveStruct(const CXXRecordDecl *RD, const CXXBaseSpecifier &BS) final {
16391629
const CXXRecordDecl *BaseClass = BS.getType()->getAsCXXRecordDecl();
16401630
addStructInit(BaseClass);
16411631
MemberExprBases.pop_back();
1632+
return true;
16421633
}
16431634

16441635
bool enterField(const CXXRecordDecl *RD, FieldDecl *FD) final {
@@ -1687,11 +1678,13 @@ class SyclKernelBodyCreator
16871678

16881679
using SyclKernelFieldHandler::enterArray;
16891680
using SyclKernelFieldHandler::enterField;
1681+
using SyclKernelFieldHandler::enterStruct;
16901682
using SyclKernelFieldHandler::handleScalarType;
16911683
using SyclKernelFieldHandler::handleSyclHalfType;
16921684
using SyclKernelFieldHandler::handleSyclSamplerType;
16931685
using SyclKernelFieldHandler::leaveArray;
16941686
using SyclKernelFieldHandler::leaveField;
1687+
using SyclKernelFieldHandler::leaveStruct;
16951688
};
16961689

16971690
class SyclKernelIntHeaderCreator
@@ -1786,11 +1779,6 @@ class SyclKernelIntHeaderCreator
17861779
return true;
17871780
}
17881781

1789-
// FIXME Remove this function when structs are replaced by their fields
1790-
bool handleStructType(FieldDecl *FD, QualType FieldTy) final {
1791-
return true;
1792-
}
1793-
17941782
bool handleScalarType(FieldDecl *FD, QualType FieldTy) final {
17951783
addParam(FD, FieldTy, SYCLIntegrationHeader::kind_std_layout);
17961784
return true;

clang/test/CodeGenSYCL/sampler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
// CHECK: define spir_kernel void @{{[a-zA-Z0-9_]+}}(%opencl.sampler_t addrspace(2)* [[SAMPLER_ARG_WRAPPED:%[a-zA-Z0-9_]+]], i32 [[ARG_A:%[a-zA-Z0-9_]+]])
1616

17-
// Check alloca
17+
// Check alloca
1818
// CHECK: [[SAMPLER_ARG_WRAPPED]].addr = alloca %opencl.sampler_t addrspace(2)*, align 8
1919
// CHECK: [[ARG_A]].addr = alloca i32, align 4
2020
// CHECK: [[LAMBDA:%[0-9]+]] = alloca %"class.{{.*}}.anon.0", align 8

sycl/test/basic_tests/accessor/accessor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,8 @@ int main() {
513513
sycl::buffer<int, 1> B(&cnst, sycl::range<1>(1));
514514
sycl::buffer<int, 1> C(&data, sycl::range<1>(1));
515515

516-
517516
sycl::queue queue;
518517
queue.submit([&](sycl::handler &cgh) {
519-
520518
sycl::accessor<int, 1, sycl::access::mode::write,
521519
sycl::access::target::global_buffer>
522520
AccA(A, cgh);

0 commit comments

Comments
 (0)