forked from OSchip/llvm-project
objective-C: underline name of the missing method
in the diagnbostic. // rdar://11303469 llvm-svn: 163003
This commit is contained in:
parent
a8f3c4fe35
commit
6ce25c09ed
|
@ -6796,6 +6796,7 @@ public:
|
|||
/// \return true iff there were any incompatible types.
|
||||
bool CheckMessageArgumentTypes(QualType ReceiverType,
|
||||
Expr **Args, unsigned NumArgs, Selector Sel,
|
||||
ArrayRef<SourceLocation> SelectorLocs,
|
||||
ObjCMethodDecl *Method, bool isClassMessage,
|
||||
bool isSuperMessage,
|
||||
SourceLocation lbrac, SourceLocation rbrac,
|
||||
|
|
|
@ -1123,7 +1123,9 @@ void Sema::EmitRelatedResultTypeNote(const Expr *E) {
|
|||
|
||||
bool Sema::CheckMessageArgumentTypes(QualType ReceiverType,
|
||||
Expr **Args, unsigned NumArgs,
|
||||
Selector Sel, ObjCMethodDecl *Method,
|
||||
Selector Sel,
|
||||
ArrayRef<SourceLocation> SelectorLocs,
|
||||
ObjCMethodDecl *Method,
|
||||
bool isClassMessage, bool isSuperMessage,
|
||||
SourceLocation lbrac, SourceLocation rbrac,
|
||||
QualType &ReturnType, ExprValueKind &VK) {
|
||||
|
@ -1147,7 +1149,8 @@ bool Sema::CheckMessageArgumentTypes(QualType ReceiverType,
|
|||
: diag::warn_inst_method_not_found;
|
||||
if (!getLangOpts().DebuggerSupport)
|
||||
Diag(lbrac, DiagID)
|
||||
<< Sel << isClassMessage << SourceRange(lbrac, rbrac);
|
||||
<< Sel << isClassMessage << SourceRange(SelectorLocs.front(),
|
||||
SelectorLocs.back());
|
||||
|
||||
// In debuggers, we want to use __unknown_anytype for these
|
||||
// results so that clients can cast them.
|
||||
|
@ -1964,7 +1967,8 @@ ExprResult Sema::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo,
|
|||
|
||||
unsigned NumArgs = ArgsIn.size();
|
||||
Expr **Args = ArgsIn.data();
|
||||
if (CheckMessageArgumentTypes(ReceiverType, Args, NumArgs, Sel, Method, true,
|
||||
if (CheckMessageArgumentTypes(ReceiverType, Args, NumArgs, Sel, SelectorLocs,
|
||||
Method, true,
|
||||
SuperLoc.isValid(), LBracLoc, RBracLoc,
|
||||
ReturnType, VK))
|
||||
return ExprError();
|
||||
|
@ -2298,7 +2302,8 @@ ExprResult Sema::BuildInstanceMessage(Expr *Receiver,
|
|||
ExprValueKind VK = VK_RValue;
|
||||
bool ClassMessage = (ReceiverType->isObjCClassType() ||
|
||||
ReceiverType->isObjCQualifiedClassType());
|
||||
if (CheckMessageArgumentTypes(ReceiverType, Args, NumArgs, Sel, Method,
|
||||
if (CheckMessageArgumentTypes(ReceiverType, Args, NumArgs, Sel,
|
||||
SelectorLocs, Method,
|
||||
ClassMessage, SuperLoc.isValid(),
|
||||
LBracLoc, RBracLoc, ReturnType, VK))
|
||||
return ExprError();
|
||||
|
|
Loading…
Reference in New Issue