Skip to content

Commit ca1eafa

Browse files
committed
format ...
1 parent 5d2802f commit ca1eafa

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

clang/include/clang/Basic/LangOptions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ class LangOptionsBase {
168168
enum class SYCLFuncPtrPreference : int {
169169
Off, //< Never allowed.
170170
LabeledOnly, //< Allowed if the function has the
171-
//intel::device_indirectly_callable attribute.
171+
// intel::device_indirectly_callable attribute.
172172
DefinedOnly, //< Allowed if the function has a definition in the TU or has
173-
//the intel::device_indirectly_callable attribute.
173+
// the intel::device_indirectly_callable attribute.
174174
On, //< Allowed.
175175
};
176176

clang/include/clang/Sema/SemaSYCL.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,12 @@ class SemaSYCL : public SemaBase {
303303
DeviceDiagnosticReason Reason = DeviceDiagnosticReason::Sycl |
304304
DeviceDiagnosticReason::Esimd);
305305
SemaDiagnosticBuilder DiagIfDeviceCode(
306-
SourceLocation Loc, unsigned DiagID,
307-
const FunctionDecl *FD,
306+
SourceLocation Loc, unsigned DiagID, const FunctionDecl *FD,
308307
DeviceDiagnosticReason Reason = DeviceDiagnosticReason::Sycl |
309308
DeviceDiagnosticReason::Esimd);
310309

311-
void delayFunctionBodyCheckForAddressTaken(const FunctionDecl *FD, SourceLocation Loc);
310+
void delayFunctionBodyCheckForAddressTaken(const FunctionDecl *FD,
311+
SourceLocation Loc);
312312

313313
void checkFunctionWithAddressTaken();
314314

clang/lib/Sema/SemaOverload.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11108,7 +11108,7 @@ static bool checkAddressOfFunctionIsAvailable(Sema &S, const FunctionDecl *FD,
1110811108
if (Complain && S.getLangOpts().SYCLIsDevice &&
1110911109
S.getLangOpts().getSYCLAllowFuncPtr() !=
1111011110
LangOptions::SYCLFuncPtrPreference::Off) {
11111-
bool IsMarked = FD->hasAttr<SYCLDeviceIndirectlyCallableAttr>();
11111+
bool IsMarked = FD->hasAttr<SYCLDeviceIndirectlyCallableAttr>();
1111211112
if (S.getLangOpts().getSYCLAllowFuncPtr() ==
1111311113
LangOptions::SYCLFuncPtrPreference::LabeledOnly &&
1111411114
!IsMarked) {

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,8 @@ class DiagDeviceFunction : public RecursiveASTVisitor<DiagDeviceFunction> {
687687
SemaSYCLRef.Diag(e->getExprLoc(), diag::err_builtin_target_unsupported)
688688
<< Name << "SYCL device";
689689
}
690-
} else if (SemaSYCLRef.getLangOpts().getSYCLAllowFuncPtr() == LangOptions::SYCLFuncPtrPreference::Off &&
690+
} else if (SemaSYCLRef.getLangOpts().getSYCLAllowFuncPtr() ==
691+
LangOptions::SYCLFuncPtrPreference::Off &&
691692
!e->isTypeDependent() &&
692693
!isa<CXXPseudoDestructorExpr>(e->getCallee())) {
693694
bool MaybeConstantExpr = false;
@@ -5851,8 +5852,8 @@ void SemaSYCL::checkFunctionWithAddressTaken() {
58515852
const FunctionDecl *LexCtx = CtxLocPair.first;
58525853
SourceLocation Loc = CtxLocPair.second;
58535854
SemaRef.SYCL().DiagIfDeviceCode(
5854-
Loc, diag::err_sycl_taking_address_of_function_with_no_definition, LexCtx,
5855-
Sema::DeviceDiagnosticReason::Sycl);
5855+
Loc, diag::err_sycl_taking_address_of_function_with_no_definition,
5856+
LexCtx, Sema::DeviceDiagnosticReason::Sycl);
58565857
}
58575858
}
58585859
}

0 commit comments

Comments
 (0)