forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge from 'sycl' to 'sycl-web' (intel#5)
- Loading branch information
Showing
19 changed files
with
223 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Tests to make sure that there is no duplicate error messaging for host | ||
// REQUIRES: x86-registered-target | ||
// RUN: not %clangxx -c -target x86_64-unknown-linux-gnu -fsycl %s \ | ||
// RUN: 2>&1 | FileCheck %s | ||
|
||
void foo() { | ||
foobar s; | ||
} | ||
|
||
// CHECK: error: unknown type name 'foobar' | ||
// CHECK-NOT: error: unknown type name 'foobar' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// RUN: %clang_cc1 -triple spir64-unknown-unknown -fsycl-is-device -fsyntax-only -verify %s | ||
|
||
void variadic(int, ...); | ||
namespace NS { | ||
void variadic(int, ...); | ||
} | ||
|
||
struct S { | ||
S(int, ...); | ||
void operator()(int, ...); | ||
}; | ||
|
||
void foo() { | ||
auto x = [](int, ...) {}; | ||
x(5, 10); //expected-error{{SYCL kernel cannot call a variadic function}} | ||
} | ||
|
||
void overloaded(int, int); | ||
void overloaded(int, ...); | ||
template <typename, typename Func> | ||
__attribute__((sycl_kernel)) void task(Func KF) { | ||
KF(); // expected-note 2 {{called by 'task}} | ||
} | ||
|
||
int main() { | ||
task<class FK>([]() { | ||
variadic(5); //expected-error{{SYCL kernel cannot call a variadic function}} | ||
variadic(5, 2); //expected-error{{SYCL kernel cannot call a variadic function}} | ||
NS::variadic(5, 3); //expected-error{{SYCL kernel cannot call a variadic function}} | ||
S s(5, 4); //expected-error{{SYCL kernel cannot call a variadic function}} | ||
S s2(5); //expected-error{{SYCL kernel cannot call a variadic function}} | ||
s(5, 5); //expected-error{{SYCL kernel cannot call a variadic function}} | ||
s2(5); //expected-error{{SYCL kernel cannot call a variadic function}} | ||
foo(); //expected-note{{called by 'operator()'}} | ||
overloaded(5, 6); //expected-no-error | ||
overloaded(5, s); //expected-error{{SYCL kernel cannot call a variadic function}} | ||
overloaded(5); //expected-error{{SYCL kernel cannot call a variadic function}} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.