Skip to content

Commit 5379751

Browse files
clang-format fix
1 parent 80e6bab commit 5379751

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2905,26 +2905,25 @@ class SYCLKernelNameTypeVisitor
29052905
IsInvalid = true;
29062906
return;
29072907
}
2908-
if (!DeclCtx->isTranslationUnit() && !isa<NamespaceDecl>(DeclCtx)) {
2909-
const bool KernelNameIsMissing = Tag->getName().empty();
2910-
if (KernelNameIsMissing) {
2911-
S.Diag(KernelInvocationFuncLoc,
2912-
diag::err_sycl_kernel_incorrectly_named)
2913-
<< /* kernel name is missing */ 0;
2914-
IsInvalid = true;
2915-
return;
2916-
}
2917-
if (Tag->isCompleteDefinition()) {
2918-
S.Diag(KernelInvocationFuncLoc,
2919-
diag::err_sycl_kernel_incorrectly_named)
2920-
<< /* kernel name is not globally-visible */ 1;
2921-
IsInvalid = true;
2922-
} else
2923-
S.Diag(KernelInvocationFuncLoc, diag::warn_sycl_implicit_decl);
2924-
2925-
S.Diag(Tag->getSourceRange().getBegin(), diag::note_previous_decl)
2926-
<< Tag->getName();
2908+
if (!DeclCtx->isTranslationUnit() && !isa<NamespaceDecl>(DeclCtx)) {
2909+
const bool KernelNameIsMissing = Tag->getName().empty();
2910+
if (KernelNameIsMissing) {
2911+
S.Diag(KernelInvocationFuncLoc,
2912+
diag::err_sycl_kernel_incorrectly_named)
2913+
<< /* kernel name is missing */ 0;
2914+
IsInvalid = true;
2915+
return;
29272916
}
2917+
if (Tag->isCompleteDefinition()) {
2918+
S.Diag(KernelInvocationFuncLoc,
2919+
diag::err_sycl_kernel_incorrectly_named)
2920+
<< /* kernel name is not globally-visible */ 1;
2921+
IsInvalid = true;
2922+
} else
2923+
S.Diag(KernelInvocationFuncLoc, diag::warn_sycl_implicit_decl);
2924+
S.Diag(Tag->getSourceRange().getBegin(), diag::note_previous_decl)
2925+
<< Tag->getName();
2926+
}
29282927
}
29292928
}
29302929

0 commit comments

Comments
 (0)