summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaOpenCLCXX/kernel_invalid.cl
blob: 2efdb756446dcab390925c946db62070489b68e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -verify -fsyntax-only

struct C {
  kernel void m(); //expected-error{{kernel functions cannot be class members}}
};

template <typename T>
kernel void templ(T par) { //expected-error{{kernel functions cannot be used in a template declaration, instantiation or specialization}}
}

template <int>
kernel void bar(int par) { //expected-error{{kernel functions cannot be used in a template declaration, instantiation or specialization}}
}

kernel void foo(int); //expected-note{{previous declaration is here}}

kernel void foo(float); //expected-error{{conflicting types for 'foo'}}
OpenPOWER on IntegriCloud