Skip to content

Commit

Permalink
[SYCL] Fix test. Fix review comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
  • Loading branch information
Sergey Kanaev committed Mar 10, 2020
1 parent 283b638 commit 68af609
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
14 changes: 0 additions & 14 deletions clang/test/SemaSYCL/call-to-undefined-function.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -fsycl-is-device -verify -fsyntax-only %s

void defined() {
// empty
}

void undefined();
Expand All @@ -16,7 +15,6 @@ __attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) {

template <typename T>
void definedTpl() {
// empty
}

template <typename T>
Expand All @@ -28,67 +26,57 @@ extern SYCL_EXTERNAL void undefinedExternalTpl();

template <typename T, bool X>
void definedPartialTpl() {
// empty
}

template <>
void definedPartialTpl<char, true>() {
// empty
}

template <typename T, bool X>
struct Tpl {
void defined() {
// empty
}
};

template <typename T>
struct Tpl<T, true> {
void defined() {
// empty
}
};

template <typename T, bool X>
struct TplWithTplMethod {
template <typename T2, bool Y>
void defined() {
// empty
}
};

template <typename T>
struct TplWithTplMethod<T, true> {
template <typename T2, bool Y>
void defined() {
// empty
}
};

template <typename T, bool X>
struct TplWithTplMethod2 {
template <typename T2, bool Y>
void defined() {
// empty
}

template <>
void defined<char, true>() {
// empty
}
};

template <typename T>
struct TplWithTplMethod2<T, true> {
template <typename T2, bool Y>
void defined() {
// empty
}

template <>
void defined<char, true>() {
// empty
}
};

Expand All @@ -101,7 +89,6 @@ void useFwDeclFn() {
}

void forwardDeclFn() {
// empty
}

int main() {
Expand Down Expand Up @@ -179,5 +166,4 @@ int main() {
}

void forwardDeclFn2() {
// empty
}
2 changes: 1 addition & 1 deletion clang/test/SemaSYCL/deferred-diagnostics-emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ __attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) {
} // namespace cl

//variadic functions from SYCL kernels emit a deferred diagnostic
void variadic(int, ...);
void variadic(int, ...) {}

int calledFromKernel(int a) {
// expected-error@+1 {{zero-length arrays are not permitted in C++}}
Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaSYCL/sycl-restrict.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fcxx-exceptions -triple spir64 -fsycl-is-device -Wno-return-type -verify -fsyntax-only -std=c++17 -DSYCL_STRICT %s
// RUN: %clang_cc1 -fcxx-exceptions -triple spir64 -fsycl-is-device -Wno-return-type -verify -fsyntax-only -std=c++17 %s
// RUN: %clang_cc1 -fcxx-exceptions -triple spir64 -fsycl-is-device -fno-sycl-allow-func-ptr -Wno-return-type -verify -fsyntax-only -std=c++17 %s
// RUN: %clang_cc1 -fcxx-exceptions -triple spir64 -fsycl-is-device -DALLOW_FP=1 -fsycl-allow-func-ptr -Wno-return-type -verify -fsyntax-only -std=c++17 %s

Expand Down
4 changes: 2 additions & 2 deletions clang/test/SemaSYCL/sycl-varargs-cconv.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// The following runs only uses -Wno-sycl-strict to bypass SYCL_EXTERNAL applied
// to funtion with raw pointer parameter
// The following runs uses -Wno-sycl-strict to bypass SYCL_EXTERNAL applied to
// funtion with raw pointer parameter
// RUN: %clang_cc1 -fsycl-is-device -verify -Wno-sycl-strict -fsyntax-only %s
// RUN: %clang_cc1 -fsycl-is-device -verify -Wno-sycl-strict -fsyntax-only -DPRINTF_INVALID_DEF %s
// RUN: %clang_cc1 -fsycl-is-device -verify -fsyntax-only -Wno-sycl-strict -DPRINTF_INVALID_DECL %s
Expand Down

0 comments on commit 68af609

Please sign in to comment.