github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp --
clang/test/ASTSYCL/ast-dump-sycl-kernel-decomposition.cpp
clang/test/CodeGenSYCL/kernel-arg-decomposition.cpp
clang/include/clang/AST/ASTNodeTraverser.h
clang/include/clang/AST/RecursiveASTVisitor.h
clang/include/clang/AST/StmtSYCL.h clang/include/clang/Sema/ScopeInfo.h
clang/include/clang/Sema/SemaSYCL.h clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaSYCL.cpp
clang/lib/Sema/TreeTransform.h
clang/test/ASTSYCL/ast-dump-sycl-kernel-call-stmt.cpp
clang/test/ASTSYCL/ast-dump-sycl-kernel-entry-point.cpp
clang/test/ASTSYCL/ast-print-sycl-kernel-call.cpp
clang/test/CodeGenSYCL/function-attrs.cpp
clang/test/CodeGenSYCL/kernel-caller-entry-point.cpp
clang/test/CodeGenSYCL/sycl-kernel-entry-point-exceptions.cpp
clang/test/CodeGenSYCL/unique_stable_name_windows_diff.cpp
clang/test/SemaSYCL/sycl-kernel-entry-point-attr-appertainment.cpp
clang/test/SemaSYCL/sycl-kernel-entry-point-attr-device-odr-use.cpp
clang/test/SemaSYCL/sycl-kernel-entry-point-attr-grammar.cpp
clang/test/SemaSYCL/sycl-kernel-entry-point-attr-kernel-name-module.cpp
clang/test/SemaSYCL/sycl-kernel-entry-point-attr-kernel-name-pch.cpp
clang/test/SemaSYCL/sycl-kernel-entry-point-attr-kernel-name.cpp
clang/test/SemaSYCL/sycl-kernel-entry-point-attr-sfinae.cpp
clang/test/SemaSYCL/sycl-kernel-entry-point-attr-this.cpp
clang/test/SemaSYCL/sycl-kernel-launch-ms-compat.cpp
clang/test/SemaSYCL/sycl-kernel-launch.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 0976c3f77..b29d2f0a9 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -16467,8 +16467,8 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope,
Decl *D,
// unresolved) call expression after the function body has been parsed.
const auto *SKEPAttr = FD->getAttr<SYCLKernelEntryPointAttr>();
if (!SKEPAttr->isInvalidAttr()) {
- ExprResult LaunchIdExpr =
- SYCL().BuildSYCLKernelLaunchIdExpr(FD, SKEPAttr->getKernelName(),
"sycl_kernel_launch");
+ ExprResult LaunchIdExpr = SYCL().BuildSYCLKernelLaunchIdExpr(
+ FD, SKEPAttr->getKernelName(), "sycl_kernel_launch");
// Do not mark 'FD' as invalid if construction of `LaunchIDExpr` produces
// an invalid result. Name lookup failure for 'sycl_kernel_launch' is
// treated as an error in the definition of 'FD'; treating it as an error
diff --git a/clang/lib/Sema/SemaSYCL.cpp b/clang/lib/Sema/SemaSYCL.cpp
index b3de40cfd..71fa31a78 100644
--- a/clang/lib/Sema/SemaSYCL.cpp
+++ b/clang/lib/Sema/SemaSYCL.cpp
@@ -424,8 +424,7 @@ void SemaSYCL::CheckSYCLEntryPointFunctionDecl(FunctionDecl
*FD) {
}
}
-ExprResult SemaSYCL::BuildSYCLKernelLaunchIdExpr(FunctionDecl *FD,
- QualType KNT,
+ExprResult SemaSYCL::BuildSYCLKernelLaunchIdExpr(FunctionDecl *FD, QualType
KNT,
StringRef FuncName) {
// The current context must be the function definition context to ensure
// that name lookup is performed within the correct scope.
@@ -731,11 +730,11 @@ public:
MemberExpr *buildMemberExpr(Expr *Base, ValueDecl *Member) {
DeclAccessPair MemberDAP = DeclAccessPair::make(Member, AS_none);
MemberExpr *Result = SemaSYCLRef.SemaRef.BuildMemberExpr(
- Base, /*IsArrow */ false, SrcLoc, NestedNameSpecifierLoc(),
- SrcLoc, Member, MemberDAP,
+ Base, /*IsArrow */ false, SrcLoc, NestedNameSpecifierLoc(), SrcLoc,
+ Member, MemberDAP,
/*HadMultipleCandidates*/ false,
- DeclarationNameInfo(Member->getDeclName(), SrcLoc),
- Member->getType(), VK_LValue, OK_Ordinary);
+ DeclarationNameInfo(Member->getDeclName(), SrcLoc), Member->getType(),
+ VK_LValue, OK_Ordinary);
return Result;
}
void addFieldMemberExpr(FieldDecl *FD, QualType Ty) {
@@ -765,9 +764,9 @@ public:
CXXCastPath BasePath;
QualType DerivedTy = SemaSYCLRef.getASTContext().getCanonicalTagType(RD);
QualType BaseTy = BS.getType();
- SemaSYCLRef.SemaRef.CheckDerivedToBaseConversion(
- DerivedTy, BaseTy, SrcLoc, SourceRange(), &BasePath,
- /*IgnoreBaseAccess*/ true);
+ SemaSYCLRef.SemaRef.CheckDerivedToBaseConversion(DerivedTy, BaseTy, SrcLoc,
+ SourceRange(), &BasePath,
+ /*IgnoreBaseAccess*/
true);
auto Cast = ImplicitCastExpr::Create(
SemaSYCLRef.getASTContext(), BaseTy, CK_DerivedToBase,
MemberExprBases.back(),
@@ -1002,7 +1001,8 @@ BuildSYCLKernelEntryPointOutline(Sema &SemaRef,
FunctionDecl *FD,
// sycl_handle_special_kernel_parameters call.
// This is synthesizing the following pseudo-code:
// void kernel-entry-point(lambda-from-f kernelFunc, buffer_t* X, int Y) {
- //
sycl_handle_special_kernel_parameters<kernel-name-type>(kernelFunc.sout)(X, Y);
+ //
sycl_handle_special_kernel_parameters<kernel-name-type>(kernelFunc.sout)(X,
+ // Y);
// {
// // This is copied body of the orignal skep-attributed function.
// kernelFunc();
@@ -1029,9 +1029,9 @@ BuildSYCLKernelEntryPointOutline(Sema &SemaRef,
FunctionDecl *FD,
// Handle args for sycl_handle_special_kernel_parameters call, these are
// coming from subobjects with sycl_special_kernel_parameter attribute
- // within skep-attributed function arguments, SpecialArgs are additional
kernel
- // arguments that are needed to initialize special subobjects and they go
- // to the subsequent call.
+ // within skep-attributed function arguments, SpecialArgs are additional
+ // kernel arguments that are needed to initialize special subobjects and
+ // they go to the subsequent call.
SmallVector<Expr *, 12> SpecialArgs;
for (auto QT : SpecialArgTys) {
ImplicitParamDecl *IPD = ImplicitParamDecl::Create(
@@ -1046,7 +1046,8 @@ BuildSYCLKernelEntryPointOutline(Sema &SemaRef,
FunctionDecl *FD,
SpecialArgs.push_back(Arg.get());
}
- // This generates
sycl_handle_special_kernel_parameters<kernel-name-type>(kernelFunc.sout)
+ // This generates
+ // sycl_handle_special_kernel_parameters<kernel-name-type>(kernelFunc.sout)
ExprResult FirstHandleCallResult = SemaRef.BuildCallExpr(
SemaRef.getCurScope(), IdExpr, Loc, HandleArgs, Loc);
if (FirstHandleCallResult.isInvalid())
@@ -1075,7 +1076,6 @@ BuildSYCLKernelEntryPointOutline(Sema &SemaRef,
FunctionDecl *FD,
OFD->setBody(OFDBody);
OFD->setNothrow();
return OFD;
-
}
} // unnamed namespace
``````````
</details>
https://github.com/llvm/llvm-project/pull/196128
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits