[cfe-commits] r53842 - /cfe/trunk/lib/Sema/SemaExprObjC.cpp
Chris Lattner
sabre at nondot.org
Sun Jul 20 23:16:07 PDT 2008
Author: lattner
Date: Mon Jul 21 01:16:07 2008
New Revision: 53842
URL: http://llvm.org/viewvc/llvm-project?rev=53842&view=rev
Log:
improve diagnostics about problems with receivers to highlight the receiver.
Modified:
cfe/trunk/lib/Sema/SemaExprObjC.cpp
Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=53842&r1=53841&r2=53842&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Mon Jul 21 01:16:07 2008
@@ -266,7 +266,7 @@
Method = InstanceMethodPool[Sel].Method;
if (!Method) {
Diag(lbrac, diag::warn_method_not_found, std::string("-"), Sel.getName(),
- SourceRange(lbrac, rbrac));
+ RExpr->getSourceRange());
returnType = Context.getObjCIdType();
} else {
returnType = Method->getResultType();
@@ -295,7 +295,7 @@
if (!Method)
Diag(lbrac, diag::warn_method_not_found_in_protocol,
std::string("-"), Sel.getName(),
- SourceRange(lbrac, rbrac));
+ RExpr->getSourceRange());
} else if (const ObjCInterfaceType *OCIReceiver =
receiverType->getAsPointerToObjCInterfaceType()) {
// We allow sending a message to a pointer to an interface (an object).
@@ -321,7 +321,7 @@
SourceRange(lbrac, rbrac));
} else {
Diag(lbrac, diag::error_bad_receiver_type,
- RExpr->getType().getAsString());
+ RExpr->getType().getAsString(), RExpr->getSourceRange());
return true;
}
More information about the cfe-commits
mailing list