1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
8 T
TemplNoArgs(); // expected-note {{possible target for call}} // expected-note {{possible target for call}}
11 T
TemplOneArg(T
); // expected-note {{possible target for call}} // expected-note {{possible target for call}}
13 void* operator new(__SIZE_TYPE__
, int);
20 int (S::*pNoArgs
)() = &S::NoArgs
;
21 int (S::*pOneArg
)(int) = &S::OneArg
;
22 int (S::*pTemplNoArgs
)() = &S::TemplNoArgs
<int>;
23 int (S::*pTemplOneArg
)(int) = &S::TemplOneArg
<int>;
28 new (ps
->OneArg(1)) S
;
29 new ((s
.*pNoArgs
)()) S
;
30 new ((s
.*pOneArg
)(1)) S
;
31 new ((ps
->*pNoArgs
)()) S
;
32 new ((ps
->*pOneArg
)(1)) S
;
34 new (s
.TemplNoArgs
<int>()) S
;
35 new (s
.TemplOneArg
<int>(1)) S
;
36 new (ps
->TemplNoArgs
<int>()) S
;
37 new (ps
->TemplOneArg
<int>(1)) S
;
38 new ((s
.*pTemplNoArgs
)()) S
;
39 new ((s
.*pTemplOneArg
)(1)) S
;
40 new ((ps
->*pTemplNoArgs
)()) S
;
41 new ((ps
->*pTemplOneArg
)(1)) S
;
43 new (s
.NoArgs
) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
44 new (s
.OneArg
) S
; // expected-error {{reference to non-static member function must be called}}
45 new (ps
->NoArgs
) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
46 new (ps
->OneArg
) S
; // expected-error {{reference to non-static member function must be called}}
47 new (s
.*pNoArgs
) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
48 new (s
.*pOneArg
) S
; // expected-error {{reference to non-static member function must be called}}
49 new (ps
->*pNoArgs
) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
50 new (ps
->*pOneArg
) S
; // expected-error {{reference to non-static member function must be called}}
51 new ((s
.*pNoArgs
)) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
52 new ((s
.*pOneArg
)) S
; // expected-error {{reference to non-static member function must be called}}
53 new ((ps
->*pNoArgs
)) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
54 new ((ps
->*pOneArg
)) S
; // expected-error {{reference to non-static member function must be called}}
56 new (s
.TemplNoArgs
<int>) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
57 new (s
.TemplOneArg
<int>) S
; // expected-error {{reference to non-static member function must be called}}
58 new (ps
->TemplNoArgs
<int>) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
59 new (ps
->TemplOneArg
<int>) S
; // expected-error {{reference to non-static member function must be called}}
60 new (s
.*pTemplNoArgs
) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
61 new (s
.*pTemplOneArg
) S
; // expected-error {{reference to non-static member function must be called}}
62 new (ps
->*pTemplNoArgs
) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
63 new (ps
->*pTemplOneArg
) S
; // expected-error {{reference to non-static member function must be called}}
64 new ((s
.*pTemplNoArgs
)) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
65 new ((s
.*pTemplOneArg
)) S
; // expected-error {{reference to non-static member function must be called}}
66 new ((ps
->*pTemplNoArgs
)) S
; // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
67 new ((ps
->*pTemplOneArg
)) S
; // expected-error {{reference to non-static member function must be called}}