Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
Eli Friedman | 1795d37 | 2011-08-26 19:46:22 +0000 | [diff] [blame] | 2 | |
| 3 | struct PR10757 { |
| 4 | bool operator~() = delete; // expected-note {{explicitly deleted}} |
| 5 | bool operator==(const PR10757&) = delete; // expected-note {{explicitly deleted}} |
| 6 | operator float(); |
| 7 | }; |
| 8 | int PR10757f() { |
| 9 | PR10757 a1; |
| 10 | // FIXME: We get a ridiculous number of "built-in candidate" notes here... |
Richard Smith | 3c2fcf8 | 2012-06-10 08:00:26 +0000 | [diff] [blame] | 11 | 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 Friedman | 1795d37 | 2011-08-26 19:46:22 +0000 | [diff] [blame] | 13 | } |
Richard Smith | 7a9f492 | 2012-02-25 09:42:26 +0000 | [diff] [blame] | 14 | |
| 15 | struct DelOpDel { |
| 16 | virtual ~DelOpDel() {} // expected-error {{deleted function}} |
| 17 | void operator delete(void*) = delete; // expected-note {{deleted here}} |
| 18 | }; |