1 // RUN: clang-cc -fsyntax-only -verify -std=c++0x %s
3 int i = delete; // expected-error {{only functions can have deleted definitions}}
5 void fn() = delete; // expected-note {{candidate function has been explicitly deleted}}
7 void fn2(); // expected-note {{previous declaration is here}}
8 void fn2() = delete; // expected-error {{deleted definition must be first declaration}}
12 // FIXME: This definition should be invalid.
15 void ov(int) {} // expected-note {{candidate function}}
16 void ov(double) = delete; // expected-note {{candidate function has been explicitly deleted}}
19 WithDel() = delete; // expected-note {{candidate function has been explicitly deleted}}
20 void fn() = delete; // expected-note {{function has been explicitly marked deleted here}}
21 operator int() = delete;
22 void operator +(int) = delete;
24 int i = delete; // expected-error {{only functions can have deleted definitions}}
28 fn(); // expected-error {{call to deleted function 'fn'}}
30 ov(1.0); // expected-error {{call to deleted function 'ov'}}
32 WithDel dd; // expected-error {{call to deleted constructor of 'dd'}}
34 d->fn(); // expected-error {{attempt to use a deleted function}}
35 int i = *d; // expected-error {{incompatible type initializing}}