We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19e5168 commit 6ca8af6Copy full SHA for 6ca8af6
clang/lib/Sema/SemaSYCL.cpp
@@ -250,6 +250,12 @@ class MarkDeviceFunction : public RecursiveASTVisitor<MarkDeviceFunction> {
250
Ty = QualType{Ty->getPointeeOrArrayElementType(), 0};
251
252
if (const auto *CRD = Ty->getAsCXXRecordDecl()) {
253
+ // FIXME: this seems like a temporary fix for SYCL programs
254
+ // that pre-declare, use, but not define OclCXX classes,
255
+ // which are later translated into SPIRV types.
256
+ if(!CRD->hasDefinition())
257
+ return true;
258
+
259
if (CRD->isPolymorphic()) {
260
SemaRef.Diag(CRD->getLocation(), diag::err_sycl_virtual_types);
261
SemaRef.Diag(Loc.getBegin(), diag::note_sycl_used_here);
0 commit comments