def err_cannot_form_pointer_to_member_of_reference_type : Error<
"cannot form a pointer-to-member to member %0 of reference type %1">;
def err_invalid_use_of_bound_member_func : Error<
- "a bound member function may only be used to call itself">;
+ "a bound member function may only be called">;
def err_incomplete_object_call : Error<
"incomplete type in call to object of type %0">;
def err_incomplete_pointer_to_member_return : Error<
};
void f3(S3* p, void (S3::*m)()) {
- p->*m; // expected-error {{a bound member function may only be used to call it}}
- (void)(p->*m); // expected-error {{a bound member function may only be used to call it}}
- (void)(void*)(p->*m); // expected-error {{a bound member function may only be used to call it}}
- (void)reinterpret_cast<void*>(p->*m); // expected-error {{a bound member function may only be used to call it}}
- if (p->*m) {} // expected-error {{a bound member function may only be used to call it}}
+ p->*m; // expected-error {{a bound member function may only be called}}
+ (void)(p->*m); // expected-error {{a bound member function may only be called}}
+ (void)(void*)(p->*m); // expected-error {{a bound member function may only be called}}
+ (void)reinterpret_cast<void*>(p->*m); // expected-error {{a bound member function may only be called}}
+ if (p->*m) {} // expected-error {{a bound member function may only be called}}
- p->m; // expected-error {{a bound member function may only be used to call it}}
+ p->m; // expected-error {{a bound member function may only be called}}
}