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