2013-01-20 20:31:11 +08:00
|
|
|
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
|
|
|
|
|
|
|
|
event_t glb_evt; // expected-error {{the event_t type cannot be used to declare a program scope variable}}
|
|
|
|
|
2013-04-06 04:14:50 +08:00
|
|
|
constant struct evt_s {
|
2013-01-20 20:31:11 +08:00
|
|
|
event_t evt; // expected-error {{the event_t type cannot be used to declare a structure or union field}}
|
2014-01-03 22:16:55 +08:00
|
|
|
} evt_str = {0};
|
2013-01-20 20:31:11 +08:00
|
|
|
|
|
|
|
void foo(event_t evt); // expected-note {{passing argument to parameter 'evt' here}}
|
|
|
|
|
2013-07-23 09:23:36 +08:00
|
|
|
void kernel ker(event_t argevt) { // expected-error {{'event_t' cannot be used as the type of a kernel parameter}}
|
2013-01-20 20:31:11 +08:00
|
|
|
event_t e;
|
|
|
|
constant event_t const_evt; // expected-error {{the event_t type can only be used with __private address space qualifier}}
|
|
|
|
foo(e);
|
|
|
|
foo(0);
|
|
|
|
foo(5); // expected-error {{passing 'int' to parameter of incompatible type 'event_t'}}
|
|
|
|
}
|
2013-07-23 09:23:36 +08:00
|
|
|
|