brintos

brintos / llvm-project-archived public Read only

0
0
Text · 524 B · 1eaa453 Raw
28 lines · plain
1// RUN: %clang_cc1 -emit-pch %s -o %t2// RUN: %clang_cc1 -verify -verify-ignore-unexpected=note -include-pch %t -fsyntax-only %s3 4#ifndef HEADER5#define HEADER6 7#pragma clang force_cuda_host_device begin8#pragma clang force_cuda_host_device begin9#pragma clang force_cuda_host_device end10 11void hd1() {}12 13#else14 15void hd2() {}16 17#pragma clang force_cuda_host_device end18 19void 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#endif28