[cfe-commits] r44665 - in /cfe/trunk: Driver/RewriteTest.cpp Sema/SemaExpr.cpp
Fariborz Jahanian
fjahanian at apple.com
Thu Dec 6 11:49:56 PST 2007
Author: fjahanian
Date: Thu Dec 6 13:49:56 2007
New Revision: 44665
URL: http://llvm.org/viewvc/llvm-project?rev=44665&view=rev
Log:
On Steve's suggestion, moved handling of use of undeclared method in a message
to rewriter (my previous patch).
Modified:
cfe/trunk/Driver/RewriteTest.cpp
cfe/trunk/Sema/SemaExpr.cpp
Modified: cfe/trunk/Driver/RewriteTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteTest.cpp?rev=44665&r1=44664&r2=44665&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteTest.cpp (original)
+++ cfe/trunk/Driver/RewriteTest.cpp Thu Dec 6 13:49:56 2007
@@ -1419,8 +1419,8 @@
// Now do the "normal" pointer to function cast.
QualType castType = Context->getFunctionType(returnType,
- &ArgTypes[0], ArgTypes.size(),
- Exp->getMethodDecl()->isVariadic());
+ &ArgTypes[0], ArgTypes.size(),
+ Exp->getMethodDecl() ? Exp->getMethodDecl()->isVariadic() : false);
castType = Context->getPointerType(castType);
cast = new CastExpr(castType, cast, SourceLocation());
@@ -1444,8 +1444,8 @@
SourceLocation());
// Now do the "normal" pointer to function cast.
castType = Context->getFunctionType(returnType,
- &ArgTypes[0], ArgTypes.size(),
- Exp->getMethodDecl()->isVariadic());
+ &ArgTypes[0], ArgTypes.size(),
+ Exp->getMethodDecl() ? Exp->getMethodDecl()->isVariadic() : false);
castType = Context->getPointerType(castType);
cast = new CastExpr(castType, cast, SourceLocation());
Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=44665&r1=44664&r2=44665&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Thu Dec 6 13:49:56 2007
@@ -2242,10 +2242,6 @@
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