1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2f4a2713aSLionel Sambuc
3f4a2713aSLionel Sambuc struct PR10757 {
4f4a2713aSLionel Sambuc bool operator~() = delete; // expected-note {{explicitly deleted}}
5f4a2713aSLionel Sambuc bool operator==(const PR10757&) = delete; // expected-note {{explicitly deleted}}
6f4a2713aSLionel Sambuc operator float();
7f4a2713aSLionel Sambuc };
PR10757f()8f4a2713aSLionel Sambuc int PR10757f() {
9f4a2713aSLionel Sambuc PR10757 a1;
10f4a2713aSLionel Sambuc // FIXME: We get a ridiculous number of "built-in candidate" notes here...
11f4a2713aSLionel Sambuc if(~a1) {} // expected-error {{overload resolution selected deleted operator}} expected-note 8 {{built-in candidate}}
12f4a2713aSLionel Sambuc if(a1==a1) {} // expected-error {{overload resolution selected deleted operator}} expected-note 121 {{built-in candidate}}
13f4a2713aSLionel Sambuc }
14f4a2713aSLionel Sambuc
15f4a2713aSLionel Sambuc struct DelOpDel {
16*0a6a1f1dSLionel Sambuc // FIXME: In MS ABI, we error twice below.
~DelOpDelDelOpDel17*0a6a1f1dSLionel Sambuc virtual ~DelOpDel() {} // expected-error 1-2 {{attempt to use a deleted function}}
18*0a6a1f1dSLionel Sambuc void operator delete(void*) = delete; // expected-note 1-2 {{deleted here}}
19f4a2713aSLionel Sambuc };
20