annotate clang/test/SemaSYCL/kernel-attribute-on-non-sycl.cpp @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -fsycl-is-device -verify %s
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -x c++ %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 #ifndef __SYCL_DEVICE_ONLY__
anatofuz
parents:
diff changeset
5 // expected-warning@+7 {{'sycl_kernel' attribute ignored}}
anatofuz
parents:
diff changeset
6 // expected-warning@+8 {{'sycl_kernel' attribute ignored}}
anatofuz
parents:
diff changeset
7 #else
anatofuz
parents:
diff changeset
8 // expected-no-diagnostics
anatofuz
parents:
diff changeset
9 #endif
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 template <typename T, typename A, int B>
anatofuz
parents:
diff changeset
12 __attribute__((sycl_kernel)) void foo(T P);
anatofuz
parents:
diff changeset
13 template <typename T, typename A, int B>
anatofuz
parents:
diff changeset
14 [[clang::sycl_kernel]] void foo1(T P);