blob: 9ace0acee89bf0b1fa57785d19358dd0b29c30b1 [file] [log] [blame]
Richard Smith762bb9d2011-10-13 22:29:44 +00001// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
Sean Hunt7880bc32011-05-13 01:01:05 +00002
3int i = delete; // expected-error{{only functions}}
4int j = default; // expected-error{{special member functions}}
5
6int f() = delete, g; // expected-error{{standalone}}
7int o, p() = delete; // expected-error{{standalone}}
8
9struct foo {
10 foo() = default;
11 ~foo() = delete;
12 void bar() = delete;
13};
14
15void baz() = delete;
Richard Smithc430ef42011-11-10 09:08:44 +000016
17struct quux {
18 int quux() = default; // expected-error{{constructor cannot have a return type}} expected-error {{member 'quux' has the same name as its class}}
19};