Skip to content

Commit ee9e906

Browse files
committed
Formatting and remove warnings
1 parent 435402b commit ee9e906

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
// This implements Semantic Analysis for SYCL constructs.
99
//===----------------------------------------------------------------------===//
10-
#include <iostream>
10+
1111
#include "clang/Sema/SemaSYCL.h"
1212
#include "TreeTransform.h"
1313
#include "clang/AST/AST.h"
@@ -6739,15 +6739,13 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
67396739
else
67406740
ParmList += ", ";
67416741
ParmList += Param->getType().getCanonicalType().getAsString(Policy);
6742-
Param->getType()->dump();
67436742
}
67446743
FunctionTemplateDecl *FTD = K.SyclKernel->getPrimaryTemplate();
67456744
Policy.PrintCanonicalTypes = true;
67466745
Policy.SuppressDefinition = true;
67476746
Policy.PolishForDeclaration = true;
67486747
Policy.FullyQualifiedName = true;
6749-
Policy.EnforceScopeForElaboratedTypes = true;
6750-
6748+
Policy.EnforceScopeForElaboratedTypes = true;
67516749
// Now we need to print the declaration of the kernel itself.
67526750
// Example:
67536751
// template <typename T, typename = int> struct Arg {

clang/test/CodeGenSYCL/Inputs/sycl.hpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ struct sampler_impl {
3434
class __attribute__((sycl_special_class)) __SYCL_TYPE(sampler) sampler {
3535
struct sampler_impl impl;
3636
#ifdef __SYCL_DEVICE_ONLY__
37-
sampler() = default;
3837
void __init(__ocl_sampler_t Sampler) { impl.m_Sampler = Sampler; }
38+
public:
39+
sampler() = default;
3940
#endif
4041

4142
public:
@@ -329,7 +330,7 @@ class __attribute__((sycl_special_class)) __SYCL_TYPE(accessor) accessor {
329330

330331
public:
331332
#ifdef __SYCL_DEVICE_ONLY__
332-
accessor() = default;
333+
accessor() = default;
333334
#endif
334335
void use(void) const {}
335336
template <typename... T>
@@ -494,19 +495,21 @@ int printf(const __SYCL_CONSTANT_AS char *__format, Args... args) {
494495
template <typename T, typename... Props>
495496
class __attribute__((sycl_special_class)) __SYCL_TYPE(annotated_arg) annotated_arg {
496497
T obj;
497-
#ifdef __SYCL_DEVICE_ONLY__
498-
annotated_arg() = default;
498+
#ifdef __SYCL_DEVICE_ONLY__
499499
void __init(T _obj) {}
500-
#endif
500+
public:
501+
annotated_arg() = default;
502+
#endif
501503
};
502504

503505
template <typename T, typename... Props>
504506
class __attribute__((sycl_special_class)) __SYCL_TYPE(annotated_ptr) annotated_ptr {
505507
T* obj;
506-
#ifdef __SYCL_DEVICE_ONLY__
507-
annotated_ptr() = default;
508+
#ifdef __SYCL_DEVICE_ONLY__
508509
void __init(T* _obj) {}
509-
#endif
510+
public:
511+
annotated_ptr() = default;
512+
#endif
510513
};
511514

512515
} // namespace experimental

sycl/include/sycl/handler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ class __SYCL_EXPORT handler {
520520

521521
/// Saves the location of user's code passed in \p CodeLoc for future usage in
522522
/// finalize() method.
523-
/// TODO: remove the first version of this func (the one without the IsTopCodeLoc arg)
523+
/// TODO: remove the first version of this func (the one without the IsTopCodeLoc arg)
524524
/// at the next ABI breaking window since removing it breaks ABI on windows.
525525
void saveCodeLoc(detail::code_location CodeLoc);
526526
void saveCodeLoc(detail::code_location CodeLoc, bool IsTopCodeLoc);

0 commit comments

Comments
 (0)