Anastasia Stulova | 88ed70e | 2019-07-25 11:04:29 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -verify -fsyntax-only |
Anastasia Stulova | d6865b7 | 2019-05-07 14:22:34 +0000 | [diff] [blame] | 2 | |
| 3 | struct C { |
| 4 | kernel void m(); //expected-error{{kernel functions cannot be class members}} |
| 5 | }; |
| 6 | |
| 7 | template <typename T> |
| 8 | kernel void templ(T par) { //expected-error{{kernel functions cannot be used in a template declaration, instantiation or specialization}} |
| 9 | } |
| 10 | |
| 11 | template <int> |
| 12 | kernel void bar(int par) { //expected-error{{kernel functions cannot be used in a template declaration, instantiation or specialization}} |
| 13 | } |
| 14 | |
| 15 | kernel void foo(int); //expected-note{{previous declaration is here}} |
| 16 | |
| 17 | kernel void foo(float); //expected-error{{conflicting types for 'foo'}} |