if (SC == SC_Static) {
if (!D.isInvalidType())
Diag(D.getIdentifierLoc(), diag::err_conv_function_not_member)
- << "static" << SourceRange(D.getDeclSpec().getStorageClassSpecLoc())
- << SourceRange(D.getIdentifierLoc());
+ << SourceRange(D.getDeclSpec().getStorageClassSpecLoc())
+ << D.getName().getSourceRange();
D.setInvalidType();
SC = SC_None;
}
float g() {
return operator float(); // expected-error{{use of undeclared 'operator float'}}
}
+
+ static operator short(); // expected-error{{conversion function must be a non-static member function}}
};
operator int(); // expected-error{{conversion function must be a non-static member function}}