Skip to content

Commit 870a49e

Browse files
committed
Fix clang-format complaints.
1 parent 3c4a2b8 commit 870a49e

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

clang/include/clang/AST/SYCLKernelInfo.h

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,22 @@
1313
#ifndef LLVM_CLANG_AST_SYCLKERNELINFO_H
1414
#define LLVM_CLANG_AST_SYCLKERNELINFO_H
1515

16-
#include <string>
1716
#include "clang/AST/Decl.h"
1817
#include "clang/AST/Type.h"
18+
#include <string>
1919

2020
namespace clang {
2121

2222
class SYCLKernelInfo {
2323
public:
24-
SYCLKernelInfo(
25-
CanQualType KernelNameType,
26-
const FunctionDecl *KernelEntryPointDecl)
27-
:
28-
KernelNameType(KernelNameType),
29-
KernelEntryPointDecl(KernelEntryPointDecl)
30-
{}
31-
32-
CanQualType GetKernelNameType() const {
33-
return KernelNameType;
34-
}
24+
SYCLKernelInfo(CanQualType KernelNameType,
25+
const FunctionDecl *KernelEntryPointDecl)
26+
: KernelNameType(KernelNameType),
27+
KernelEntryPointDecl(KernelEntryPointDecl) {}
28+
29+
CanQualType GetKernelNameType() const { return KernelNameType; }
3530

36-
const FunctionDecl* GetKernelEntryPointDecl() const {
31+
const FunctionDecl *GetKernelEntryPointDecl() const {
3732
return KernelEntryPointDecl;
3833
}
3934

clang/lib/AST/ASTContext.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14299,7 +14299,7 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
1429914299
static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
1430014300
CanQualType KernelNameType,
1430114301
const FunctionDecl *FD) {
14302-
return { KernelNameType, FD };
14302+
return {KernelNameType, FD};
1430314303
}
1430414304

1430514305
void ASTContext::registerSYCLEntryPointFunction(FunctionDecl *FD) {
@@ -14316,8 +14316,7 @@ void ASTContext::registerSYCLEntryPointFunction(FunctionDecl *FD) {
1431614316
llvm::report_fatal_error("SYCL kernel name conflict");
1431714317
} else {
1431814318
SYCLKernels.insert_or_assign(
14319-
KernelNameType,
14320-
BuildSYCLKernelInfo(*this, KernelNameType, FD));
14319+
KernelNameType, BuildSYCLKernelInfo(*this, KernelNameType, FD));
1432114320
}
1432214321
}
1432314322

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,6 @@ void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) {
204204
TypeSourceInfo *TSI = nullptr;
205205
(void)SemaRef.GetTypeFromParser(PT, &TSI);
206206
assert(TSI && "no type source info for attribute argument");
207-
D->addAttr(::new (SemaRef.Context) SYCLKernelEntryPointAttr(SemaRef.Context,
208-
AL, TSI));
207+
D->addAttr(::new (SemaRef.Context)
208+
SYCLKernelEntryPointAttr(SemaRef.Context, AL, TSI));
209209
}

0 commit comments

Comments
 (0)