File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -2499,8 +2499,7 @@ class SYCLKernelNameTypeVisitor
2499
2499
if (const auto *TSD = dyn_cast<ClassTemplateSpecializationDecl>(RD)) {
2500
2500
const TemplateArgumentList &Args = TSD->getTemplateArgs ();
2501
2501
for (unsigned I = 0 ; I < Args.size (); I++) {
2502
- const TemplateArgument &TemplateArg = Args[I];
2503
- Visit (TemplateArg);
2502
+ Visit (Args[I]);
2504
2503
}
2505
2504
} else {
2506
2505
InnerTypeVisitor::Visit (T.getTypePtr ());
@@ -2517,9 +2516,7 @@ class SYCLKernelNameTypeVisitor
2517
2516
const EnumDecl *ED = T->getDecl ();
2518
2517
if (!ED->isScoped () && !ED->isFixed ()) {
2519
2518
S.Diag (KernelInvocationFuncLoc, diag::err_sycl_kernel_incorrectly_named)
2520
- << /* kernel name is invalid. Unscoped enum requires fixed underlying
2521
- type */
2522
- 2 ;
2519
+ << /* Unscoped enum requires fixed underlying type */ 2 ;
2523
2520
S.Diag (ED->getSourceRange ().getBegin (), diag::note_entity_declared_at)
2524
2521
<< ED;
2525
2522
}
@@ -2572,8 +2569,7 @@ class SYCLKernelNameTypeVisitor
2572
2569
for (NamedDecl *P : *TemplateParams) {
2573
2570
if (NonTypeTemplateParmDecl *TemplateParam =
2574
2571
dyn_cast<NonTypeTemplateParmDecl>(P)) {
2575
- QualType T = TemplateParam->getType ();
2576
- if (const EnumType *ET = T->getAs <EnumType>()) {
2572
+ if (const EnumType *ET = TemplateParam->getType ()->getAs <EnumType>()) {
2577
2573
VisitEnumType (ET);
2578
2574
}
2579
2575
}
You can’t perform that action at this time.
0 commit comments