Skip to content

Commit f6f1806

Browse files
author
Alexander Batashev
committed
Address feedback
1 parent ef2cd88 commit f6f1806

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11033,8 +11033,8 @@ def err_sycl_compiletime_property_duplication : Error<
1103311033
def err_sycl_invalid_property_list_param_number : Error<
1103411034
"%0 must have exactly one template parameter">;
1103511035
def err_sycl_invalid_accessor_property_template_param : Error<
11036-
"Sixth template parameter of the accessor must be of accessor_property_list "
11037-
"or property_list type">;
11036+
"sixth template parameter of the accessor must be of accessor_property_list "
11037+
"type">;
1103811038
def err_sycl_invalid_accessor_property_list_template_param : Error<
1103911039
"%select{accessor_property_list|accessor_property_list pack argument|buffer_location}0 "
1104011040
"template parameter must be a "

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,16 +1256,18 @@ class SyclKernelFieldChecker : public SyclKernelFieldHandler {
12561256
"Should only be called on SYCL accessor types.");
12571257

12581258
RecordDecl *RecD = Ty->getAsRecordDecl();
1259-
if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RecD)) {
1259+
if (const ClassTemplateSpecializationDecl *CTSD =
1260+
dyn_cast<ClassTemplateSpecializationDecl>(RecD)) {
12601261
const TemplateArgumentList &TAL = CTSD->getTemplateArgs();
12611262

12621263
TemplateArgument TA = TAL.get(0);
12631264
const QualType TemplateArgTy = TA.getAsType();
1264-
llvm::DenseSet<QualType> Visited;
1265-
checkSYCLType(SemaRef, TemplateArgTy, Loc, Visited);
12661265

12671266
if (TAL.size() > 5)
12681267
checkPropertyListType(TAL.get(5), Loc.getBegin());
1268+
1269+
llvm::DenseSet<QualType> Visited;
1270+
checkSYCLType(SemaRef, TemplateArgTy, Loc, Visited);
12691271
}
12701272
}
12711273

clang/test/SemaSYCL/buffer_location.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int main() {
8484
#else
8585
//expected-error@+1{{buffer_location template parameter must be a non-negative integer}}
8686
accessorD.use();
87-
//expected-error@+1{{Sixth template parameter of the accessor must be of accessor_property_list or property_list type}}
87+
//expected-error@+1{{sixth template parameter of the accessor must be of accessor_property_list type}}
8888
accessorE.use();
8989
//expected-error@+1{{Can't apply buffer_location property twice to the same accessor}}
9090
accessorF.use();

0 commit comments

Comments
 (0)