@@ -72,34 +72,34 @@ class Util {
72
72
73
73
// / Checks whether given clang type is a full specialization of the SYCL
74
74
// / accessor class.
75
- static bool isSyclAccessorType (const QualType & Ty);
75
+ static bool isSyclAccessorType (QualType Ty);
76
76
77
77
// / Checks whether given clang type is a full specialization of the SYCL
78
78
// / sampler class.
79
- static bool isSyclSamplerType (const QualType & Ty);
79
+ static bool isSyclSamplerType (QualType Ty);
80
80
81
81
// / Checks whether given clang type is a full specialization of the SYCL
82
82
// / stream class.
83
- static bool isSyclStreamType (const QualType & Ty);
83
+ static bool isSyclStreamType (QualType Ty);
84
84
85
85
// / Checks whether given clang type is a full specialization of the SYCL
86
86
// / half class.
87
- static bool isSyclHalfType (const QualType & Ty);
87
+ static bool isSyclHalfType (QualType Ty);
88
88
89
89
// / Checks whether given clang type is a full specialization of the SYCL
90
90
// / accessor_property_list class.
91
- static bool isAccessorPropertyListType (const QualType & Ty);
91
+ static bool isAccessorPropertyListType (QualType Ty);
92
92
93
93
// / Checks whether given clang type is a full specialization of the SYCL
94
94
// / buffer_location class.
95
- static bool isSyclBufferLocationType (const QualType & Ty);
95
+ static bool isSyclBufferLocationType (QualType Ty);
96
96
97
97
// / Checks whether given clang type is a standard SYCL API class with given
98
98
// / name.
99
99
// / \param Ty the clang type being checked
100
100
// / \param Name the class name checked against
101
101
// / \param Tmpl whether the class is template instantiation or simple record
102
- static bool isSyclType (const QualType & Ty, StringRef Name, bool Tmpl = false );
102
+ static bool isSyclType (QualType Ty, StringRef Name, bool Tmpl = false );
103
103
104
104
// / Checks whether given function is a standard SYCL API function with given
105
105
// / name.
@@ -109,11 +109,11 @@ class Util {
109
109
110
110
// / Checks whether given clang type is a full specialization of the SYCL
111
111
// / specialization constant class.
112
- static bool isSyclSpecConstantType (const QualType & Ty);
112
+ static bool isSyclSpecConstantType (QualType Ty);
113
113
114
114
// / Checks whether given clang type is a full specialization of the SYCL
115
115
// / kernel_handler class.
116
- static bool isSyclKernelHandlerType (const QualType & Ty);
116
+ static bool isSyclKernelHandlerType (QualType Ty);
117
117
118
118
// Checks declaration context hierarchy.
119
119
// / \param DC the context of the item to be checked.
@@ -127,7 +127,7 @@ class Util {
127
127
// / \param Ty the clang type being checked
128
128
// / \param Scopes the declaration scopes leading from the type to the
129
129
// / translation unit (excluding the latter)
130
- static bool matchQualifiedTypeName (const QualType & Ty,
130
+ static bool matchQualifiedTypeName (QualType Ty,
131
131
ArrayRef<Util::DeclContextDesc> Scopes);
132
132
};
133
133
@@ -1321,7 +1321,7 @@ class SyclKernelFieldChecker : public SyclKernelFieldHandler {
1321
1321
DiagnosticsEngine &Diag;
1322
1322
// Check whether the object should be disallowed from being copied to kernel.
1323
1323
// Return true if not copyable, false if copyable.
1324
- bool checkNotCopyableToKernel (const FieldDecl *FD, const QualType & FieldTy) {
1324
+ bool checkNotCopyableToKernel (const FieldDecl *FD, QualType FieldTy) {
1325
1325
if (FieldTy->isArrayType ()) {
1326
1326
if (const auto *CAT =
1327
1327
SemaRef.getASTContext ().getAsConstantArrayType (FieldTy)) {
@@ -4305,20 +4305,16 @@ bool SYCLIntegrationFooter::emit(raw_ostream &O) {
4305
4305
// Utility class methods
4306
4306
// -----------------------------------------------------------------------------
4307
4307
4308
- bool Util::isSyclAccessorType (const QualType & Ty) {
4308
+ bool Util::isSyclAccessorType (QualType Ty) {
4309
4309
return isSyclType (Ty, " accessor" , true /* Tmpl*/ );
4310
4310
}
4311
4311
4312
- bool Util::isSyclSamplerType (const QualType &Ty) {
4313
- return isSyclType (Ty, " sampler" );
4314
- }
4312
+ bool Util::isSyclSamplerType (QualType Ty) { return isSyclType (Ty, " sampler" ); }
4315
4313
4316
- bool Util::isSyclStreamType (const QualType &Ty) {
4317
- return isSyclType (Ty, " stream" );
4318
- }
4314
+ bool Util::isSyclStreamType (QualType Ty) { return isSyclType (Ty, " stream" ); }
4319
4315
4320
- bool Util::isSyclHalfType (const QualType & Ty) {
4321
- const StringRef & Name = " half" ;
4316
+ bool Util::isSyclHalfType (QualType Ty) {
4317
+ llvm::StringLiteral Name = " half" ;
4322
4318
std::array<DeclContextDesc, 5 > Scopes = {
4323
4319
Util::DeclContextDesc{clang::Decl::Kind::Namespace, " cl" },
4324
4320
Util::DeclContextDesc{clang::Decl::Kind::Namespace, " sycl" },
@@ -4328,8 +4324,8 @@ bool Util::isSyclHalfType(const QualType &Ty) {
4328
4324
return matchQualifiedTypeName (Ty, Scopes);
4329
4325
}
4330
4326
4331
- bool Util::isSyclSpecConstantType (const QualType & Ty) {
4332
- const StringRef & Name = " spec_constant" ;
4327
+ bool Util::isSyclSpecConstantType (QualType Ty) {
4328
+ llvm::StringLiteral Name = " spec_constant" ;
4333
4329
std::array<DeclContextDesc, 5 > Scopes = {
4334
4330
Util::DeclContextDesc{clang::Decl::Kind::Namespace, " cl" },
4335
4331
Util::DeclContextDesc{clang::Decl::Kind::Namespace, " sycl" },
@@ -4339,18 +4335,18 @@ bool Util::isSyclSpecConstantType(const QualType &Ty) {
4339
4335
return matchQualifiedTypeName (Ty, Scopes);
4340
4336
}
4341
4337
4342
- bool Util::isSyclKernelHandlerType (const QualType & Ty) {
4343
- const StringRef & Name = " kernel_handler" ;
4338
+ bool Util::isSyclKernelHandlerType (QualType Ty) {
4339
+ llvm::StringLiteral Name = " kernel_handler" ;
4344
4340
std::array<DeclContextDesc, 3 > Scopes = {
4345
4341
Util::DeclContextDesc{clang::Decl::Kind::Namespace, " cl" },
4346
4342
Util::DeclContextDesc{clang::Decl::Kind::Namespace, " sycl" },
4347
4343
Util::DeclContextDesc{Decl::Kind::CXXRecord, Name}};
4348
4344
return matchQualifiedTypeName (Ty, Scopes);
4349
4345
}
4350
4346
4351
- bool Util::isSyclBufferLocationType (const QualType & Ty) {
4352
- const StringRef & PropertyName = " buffer_location" ;
4353
- const StringRef & InstanceName = " instance" ;
4347
+ bool Util::isSyclBufferLocationType (QualType Ty) {
4348
+ llvm::StringLiteral PropertyName = " buffer_location" ;
4349
+ llvm::StringLiteral InstanceName = " instance" ;
4354
4350
std::array<DeclContextDesc, 6 > Scopes = {
4355
4351
Util::DeclContextDesc{Decl::Kind::Namespace, " cl" },
4356
4352
Util::DeclContextDesc{Decl::Kind::Namespace, " sycl" },
@@ -4362,7 +4358,7 @@ bool Util::isSyclBufferLocationType(const QualType &Ty) {
4362
4358
return matchQualifiedTypeName (Ty, Scopes);
4363
4359
}
4364
4360
4365
- bool Util::isSyclType (const QualType & Ty, StringRef Name, bool Tmpl) {
4361
+ bool Util::isSyclType (QualType Ty, StringRef Name, bool Tmpl) {
4366
4362
Decl::Kind ClassDeclKind =
4367
4363
Tmpl ? Decl::Kind::ClassTemplateSpecialization : Decl::Kind::CXXRecord;
4368
4364
std::array<DeclContextDesc, 3 > Scopes = {
@@ -4387,8 +4383,8 @@ bool Util::isSyclFunction(const FunctionDecl *FD, StringRef Name) {
4387
4383
return matchContext (DC, Scopes);
4388
4384
}
4389
4385
4390
- bool Util::isAccessorPropertyListType (const QualType & Ty) {
4391
- const StringRef & Name = " accessor_property_list" ;
4386
+ bool Util::isAccessorPropertyListType (QualType Ty) {
4387
+ llvm::StringLiteral Name = " accessor_property_list" ;
4392
4388
std::array<DeclContextDesc, 4 > Scopes = {
4393
4389
Util::DeclContextDesc{clang::Decl::Kind::Namespace, " cl" },
4394
4390
Util::DeclContextDesc{clang::Decl::Kind::Namespace, " sycl" },
@@ -4428,7 +4424,7 @@ bool Util::matchContext(const DeclContext *Ctx,
4428
4424
return Ctx->isTranslationUnit ();
4429
4425
}
4430
4426
4431
- bool Util::matchQualifiedTypeName (const QualType & Ty,
4427
+ bool Util::matchQualifiedTypeName (QualType Ty,
4432
4428
ArrayRef<Util::DeclContextDesc> Scopes) {
4433
4429
const CXXRecordDecl *RecTy = Ty->getAsCXXRecordDecl ();
4434
4430
0 commit comments