1 // RUN: clang-cc -fsyntax-only -verify %s
5 void foo(...) __attribute__((__unavailable__
)); // expected-note {{candidate function}} \
6 // expected-note{{function has been explicitly marked unavailable here}}
8 void bar(...) __attribute__((__unavailable__
)); // expected-note 2{{explicitly marked unavailable}}
10 void test_foo(short* sp
) {
12 double &dr
= foo(1.0);
13 foo(sp
); // expected-error{{call to unavailable function 'foo'}}
15 void (*fp
)(...) = &bar
; // expected-warning{{'bar' is unavailable}}
16 void (*fp2
)(...) = bar
; // expected-warning{{'bar' is unavailable}}
18 int &(*fp3
)(int) = foo
;
19 void (*fp4
)(...) = foo
; // expected-warning{{'foo' is unavailable}}