Skip to content

Commit 0b7f6bf

Browse files
committed
Squash; Fix clang-format complaints.
1 parent 6ed96d3 commit 0b7f6bf

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

clang/lib/Sema/SemaDecl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
#include "clang/Sema/SemaOpenMP.h"
5353
#include "clang/Sema/SemaPPC.h"
5454
#include "clang/Sema/SemaRISCV.h"
55-
#include "clang/Sema/SemaSwift.h"
5655
#include "clang/Sema/SemaSYCL.h"
56+
#include "clang/Sema/SemaSwift.h"
5757
#include "clang/Sema/SemaWasm.h"
5858
#include "clang/Sema/Template.h"
5959
#include "llvm/ADT/STLForwardCompat.h"
@@ -15994,15 +15994,15 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body,
1599415994
if (FD->isDeleted()) {
1599515995
Diag(FD->getAttr<SYCLKernelEntryPointAttr>()->getLocation(),
1599615996
diag::err_sycl_entry_point_invalid)
15997-
<< /*deleted function*/2;
15997+
<< /*deleted function*/ 2;
1599815998
} else if (FD->isDefaulted()) {
1599915999
Diag(FD->getAttr<SYCLKernelEntryPointAttr>()->getLocation(),
1600016000
diag::err_sycl_entry_point_invalid)
16001-
<< /*defaulted function*/3;
16001+
<< /*defaulted function*/ 3;
1600216002
} else if (FSI->isCoroutine()) {
1600316003
Diag(FD->getAttr<SYCLKernelEntryPointAttr>()->getLocation(),
1600416004
diag::err_sycl_entry_point_invalid)
16005-
<< /*coroutine*/7;
16005+
<< /*coroutine*/ 7;
1600616006
}
1600716007
}
1600816008

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ static bool CheckSYCLKernelName(Sema &S, SourceLocation Loc,
235235
S.Diag(Loc, diag::warn_sycl_kernel_name_not_a_class_type) << KernelName;
236236
SourceLocation DeclTypeLoc = SourceLocationForType(KernelName);
237237
if (DeclTypeLoc.isValid())
238-
S.Diag(DeclTypeLoc, diag::note_entity_declared_at)
239-
<< KernelName;
238+
S.Diag(DeclTypeLoc, diag::note_entity_declared_at) << KernelName;
240239
return true;
241240
}
242241

@@ -248,8 +247,7 @@ void SemaSYCL::CheckSYCLEntryPointFunctionDecl(FunctionDecl *FD) {
248247
// and warn about any redundant ones.
249248
const SYCLKernelEntryPointAttr *SKEPAttr = nullptr;
250249
for (auto SAI = FD->specific_attr_begin<SYCLKernelEntryPointAttr>();
251-
SAI != FD->specific_attr_end<SYCLKernelEntryPointAttr>();
252-
++SAI) {
250+
SAI != FD->specific_attr_end<SYCLKernelEntryPointAttr>(); ++SAI) {
253251
if (!SKEPAttr) {
254252
SKEPAttr = *SAI;
255253
continue;
@@ -284,32 +282,31 @@ void SemaSYCL::CheckSYCLEntryPointFunctionDecl(FunctionDecl *FD) {
284282
Diag(SKEPAttr->getLocation(),
285283
diag::err_sycl_entry_point_invalid_redeclaration)
286284
<< SKEPAttr->getKernelName() << PrevSKEPAttr->getKernelName();
287-
Diag(PrevSKEPAttr->getLocation(), diag::note_previous_decl)
288-
<< PrevFD;;
285+
Diag(PrevSKEPAttr->getLocation(), diag::note_previous_decl) << PrevFD;
289286
}
290287
}
291288
}
292289

293290
if (auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
294291
if (!MD->isStatic()) {
295292
Diag(SKEPAttr->getLocation(), diag::err_sycl_entry_point_invalid)
296-
<< /*non-static member function*/0;
293+
<< /*non-static member function*/ 0;
297294
}
298295
}
299296
if (FD->isVariadic()) {
300297
Diag(SKEPAttr->getLocation(), diag::err_sycl_entry_point_invalid)
301-
<< /*variadic function*/1;
298+
<< /*variadic function*/ 1;
302299
}
303300
if (FD->isConsteval()) {
304301
Diag(SKEPAttr->getLocation(), diag::err_sycl_entry_point_invalid)
305-
<< /*consteval function*/5;
302+
<< /*consteval function*/ 5;
306303
} else if (FD->isConstexpr()) {
307304
Diag(SKEPAttr->getLocation(), diag::err_sycl_entry_point_invalid)
308-
<< /*constexpr function*/4;
305+
<< /*constexpr function*/ 4;
309306
}
310307
if (FD->isNoReturn()) {
311308
Diag(SKEPAttr->getLocation(), diag::err_sycl_entry_point_invalid)
312-
<< /*noreturn function*/6;
309+
<< /*noreturn function*/ 6;
313310
}
314311

315312
if (!FD->getReturnType()->isVoidType()) {

clang/lib/Serialization/ASTReaderDecl.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,13 +1136,12 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) {
11361136
if (FD->hasAttr<SYCLKernelEntryPointAttr>()) {
11371137
const auto *SKEPAttr = FD->getAttr<SYCLKernelEntryPointAttr>();
11381138
ASTContext &C = Reader.getContext();
1139-
const SYCLKernelInfo *SKI =
1140-
C.findSYCLKernelInfo(SKEPAttr->getKernelName());
1139+
const SYCLKernelInfo *SKI = C.findSYCLKernelInfo(SKEPAttr->getKernelName());
11411140
if (SKI) {
11421141
if (!declaresSameEntity(FD, SKI->getKernelEntryPointDecl())) {
11431142
Reader.Diag(FD->getLocation(), diag::err_sycl_kernel_name_conflict);
11441143
Reader.Diag(SKI->getKernelEntryPointDecl()->getLocation(),
1145-
diag::note_previous_declaration);
1144+
diag::note_previous_declaration);
11461145
}
11471146
} else {
11481147
C.registerSYCLEntryPointFunction(FD);

0 commit comments

Comments
 (0)