blob: 9f53e71d456c3eb467b205c6af2b62ec4d4bd910 [file] [log] [blame]
Richard Smith762bb9d2011-10-13 22:29:44 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
Eli Friedman1795d372011-08-26 19:46:22 +00002
3struct PR10757 {
4 bool operator~() = delete; // expected-note {{explicitly deleted}}
5 bool operator==(const PR10757&) = delete; // expected-note {{explicitly deleted}}
6 operator float();
7};
8int PR10757f() {
9 PR10757 a1;
10 // FIXME: We get a ridiculous number of "built-in candidate" notes here...
Richard Smith3c2fcf82012-06-10 08:00:26 +000011 if(~a1) {} // expected-error {{overload resolution selected deleted operator}} expected-note 8 {{built-in candidate}}
12 if(a1==a1) {} // expected-error {{overload resolution selected deleted operator}} expected-note 121 {{built-in candidate}}
Eli Friedman1795d372011-08-26 19:46:22 +000013}
Richard Smith7a9f4922012-02-25 09:42:26 +000014
15struct DelOpDel {
16 virtual ~DelOpDel() {} // expected-error {{deleted function}}
17 void operator delete(void*) = delete; // expected-note {{deleted here}}
18};