Skip to content

Commit de2c4be

Browse files
Fix review comments
1 parent 835cef0 commit de2c4be

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2510,8 +2510,7 @@ class SYCLKernelNameTypeVisitor
25102510
void Visit(const TemplateArgument &TA) {
25112511
if (TA.isNull())
25122512
return;
2513-
else
2514-
InnerTAVisitor::Visit(TA);
2513+
InnerTAVisitor::Visit(TA);
25152514
}
25162515

25172516
void VisitEnumType(const EnumType *T) {
@@ -2533,7 +2532,7 @@ class SYCLKernelNameTypeVisitor
25332532
void VisitTagDecl(const TagDecl *Tag) {
25342533
bool UnnamedLambdaEnabled =
25352534
S.getASTContext().getLangOpts().SYCLUnnamedLambda;
2536-
if (Tag && !Tag->getDeclContext()->isTranslationUnit() &&
2535+
if (!Tag->getDeclContext()->isTranslationUnit() &&
25372536
!isa<NamespaceDecl>(Tag->getDeclContext()) && !UnnamedLambdaEnabled) {
25382537
const bool KernelNameIsMissing = Tag->getName().empty();
25392538
if (KernelNameIsMissing) {
@@ -2559,14 +2558,12 @@ class SYCLKernelNameTypeVisitor
25592558
VisitEnumType(ET);
25602559
else
25612560
Visit(T);
2562-
return;
25632561
}
25642562

25652563
void VisitIntegralTemplateArgument(const TemplateArgument &TA) {
25662564
QualType T = TA.getIntegralType();
25672565
if (const EnumType *ET = T->getAs<EnumType>())
25682566
VisitEnumType(ET);
2569-
return;
25702567
}
25712568

25722569
void VisitTemplateTemplateArgument(const TemplateArgument &TA) {

0 commit comments

Comments
 (0)