1 // RUN: %clang_cc1 -fopenmp -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fopenmp -fexceptions -fsyntax-only -verify %s
4 #include "Inputs/cuda.h"
6 __device__ void foo(int) {} // expected-note {{candidate function not viable: call to __device__ function from __host__ function}}
7 // expected-note@-1 {{'foo' declared here}}
11 for (int i = 0; i < 100; i++) {
12 foo(1); // expected-error {{no matching function for call to 'foo'}}
18 for (int i = 0; i < 100; i++) {
19 foo(1); // expected-error {{reference to __device__ function 'foo' in __host__ __device__ function}}
23 Lambda(); // expected-note {{called by 'main'}}