[cfe-commits] r44648 - /cfe/trunk/Sema/SemaExpr.cpp
Fariborz Jahanian
fjahanian at apple.com
Wed Dec 5 17:37:55 PST 2007
Author: fjahanian
Date: Wed Dec 5 19:37:55 2007
New Revision: 44648
URL: http://llvm.org/viewvc/llvm-project?rev=44648&view=rev
Log:
A missing method in a messaging expression issues a warning, clients must not
crash because of this.
Modified:
cfe/trunk/Sema/SemaExpr.cpp
Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=44648&r1=44647&r2=44648&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Wed Dec 5 19:37:55 2007
@@ -2242,6 +2242,10 @@
Diag(lbrac, diag::warn_method_not_found, std::string("-"), Sel.getName(),
SourceRange(lbrac, rbrac));
returnType = Context.getObjcIdType();
+ // Must have a dummy method declaration, so clients work as expected
+ Method = new ObjcMethodDecl(SourceLocation(), SourceLocation(), Sel,
+ returnType, ClassDecl, 0, -1, 0, true, false,
+ ObjcMethodDecl::None);
} else {
returnType = Method->getResultType();
if (Sel.getNumArgs())
More information about the cfe-commits
mailing list