1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // Check the force_cuda_host_device pragma.
5 #pragma clang force_cuda_host_device begin
7 #pragma clang force_cuda_host_device begin
9 #pragma clang force_cuda_host_device end
11 #pragma clang force_cuda_host_device end
13 void i(); // expected-note {{not viable}}
22 __attribute__((device)) void device() {
26 i(); // expected-error {{no matching function}}
29 #pragma clang force_cuda_host_device foo
30 // expected-warning@-1 {{incorrect use of #pragma clang force_cuda_host_device begin|end}}
32 #pragma clang force_cuda_host_device
33 // expected-warning@-1 {{incorrect use of #pragma clang force_cuda_host_device begin|end}}
35 #pragma clang force_cuda_host_device begin foo
36 // expected-warning@-1 {{incorrect use of #pragma clang force_cuda_host_device begin|end}}