Mercurial > hg > CbC > CbC_llvm
comparison clang/test/PCH/pragma-cuda-force-host-device.cu @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 // RUN: %clang_cc1 -emit-pch %s -o %t | |
2 // RUN: %clang_cc1 -verify -verify-ignore-unexpected=note -include-pch %t -fsyntax-only %s | |
3 | |
4 #ifndef HEADER | |
5 #define HEADER | |
6 | |
7 #pragma clang force_cuda_host_device begin | |
8 #pragma clang force_cuda_host_device begin | |
9 #pragma clang force_cuda_host_device end | |
10 | |
11 void hd1() {} | |
12 | |
13 #else | |
14 | |
15 void hd2() {} | |
16 | |
17 #pragma clang force_cuda_host_device end | |
18 | |
19 void host_only() {} | |
20 | |
21 __attribute__((device)) void device() { | |
22 hd1(); | |
23 hd2(); | |
24 host_only(); // expected-error {{no matching function for call}} | |
25 } | |
26 | |
27 #endif |