template <typename T>
inline __host__ __device__ void hd() {
Selector<T>().f();
- // expected-error@-1 {{reference to __device__ function}}
- // expected-error@-2 {{reference to __device__ function}}
+ // expected-error@-1 2 {{reference to __device__ function}}
}
void host_fn() {
#include "Inputs/cuda.h"
__device__ void device_fn() {}
-// expected-note@-1 {{'device_fn' declared here}}
-// expected-note@-2 {{'device_fn' declared here}}
-// expected-note@-3 {{'device_fn' declared here}}
-// expected-note@-4 {{'device_fn' declared here}}
-// expected-note@-5 {{'device_fn' declared here}}
+// expected-note@-1 5 {{'device_fn' declared here}}
struct S {
__device__ S() {}
- // expected-note@-1 {{'S' declared here}}
- // expected-note@-2 {{'S' declared here}}
+ // expected-note@-1 2 {{'S' declared here}}
__device__ ~S() { device_fn(); }
// expected-note@-1 {{'~S' declared here}}
int x;
#include "Inputs/cuda.h"
extern "C" void host_fn() {}
-// expected-note@-1 {{'host_fn' declared here}}
-// expected-note@-2 {{'host_fn' declared here}}
-// expected-note@-3 {{'host_fn' declared here}}
-// expected-note@-4 {{'host_fn' declared here}}
-// expected-note@-5 {{'host_fn' declared here}}
-// expected-note@-6 {{'host_fn' declared here}}
-// expected-note@-7 {{'host_fn' declared here}}
+// expected-note@-1 7 {{'host_fn' declared here}}
struct Dummy {};
struct S {
S() {}
- // expected-note@-1 {{'S' declared here}}
- // expected-note@-2 {{'S' declared here}}
+ // expected-note@-1 2 {{'S' declared here}}
~S() { host_fn(); }
// expected-note@-1 {{'~S' declared here}}
int x;
#include "Inputs/cuda.h"
__device__ void device_fn(int) {}
-// expected-note@-1 {{declared here}}
-// expected-note@-2 {{declared here}}
+// expected-note@-1 2 {{declared here}}
inline __host__ __device__ int hd1() {
device_fn(0); // expected-error {{reference to __device__ function}}
void host_fn() {
launch_kernel<int>();
- // expected-note@-1 {{called by 'host_fn'}}
- // expected-note@-2 {{called by 'host_fn'}}
+ // expected-note@-1 2 {{called by 'host_fn'}}
}