1 // RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify %s
3 #include "Inputs/cuda.h"
7 // expected-note@-1 {{kernel function type 'T ()' must have void return type}}
11 foo<void><<<0, 0>>>();
13 // expected-error@-1 {{no matching function for call to 'foo'}}
16 __global__ auto f1() {
19 __global__ auto f2(int x) {
21 // expected-error@-2 {{kernel function type 'auto (int)' must have void return type}}
24 template <bool Cond, typename T = void> struct enable_if { typedef T type; };
25 template <typename T> struct enable_if<false, T> {};
29 auto bar() -> typename enable_if<N == 1>::type {
30 // expected-note@-1 {{requirement '3 == 1' was not satisfied [with N = 3]}}
35 auto bar() -> typename enable_if<N == 2>::type {
36 // expected-note@-1 {{requirement '3 == 2' was not satisfied [with N = 3]}}
43 // expected-error@-1 {{no matching function for call to 'bar'}}