[cfe-commits] r48479 - /cfe/trunk/Driver/RewriteTest.cpp
Steve Naroff
snaroff at apple.com
Mon Mar 17 19:02:04 PDT 2008
Author: snaroff
Date: Mon Mar 17 21:02:04 2008
New Revision: 48479
URL: http://llvm.org/viewvc/llvm-project?rev=48479&view=rev
Log:
Fix <rdar://problem/5716940> rewriter generates invalid C code when no selector found.
Modified:
cfe/trunk/Driver/RewriteTest.cpp
Modified: cfe/trunk/Driver/RewriteTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteTest.cpp?rev=48479&r1=48478&r2=48479&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteTest.cpp (original)
+++ cfe/trunk/Driver/RewriteTest.cpp Mon Mar 17 21:02:04 2008
@@ -2074,7 +2074,8 @@
// Now do the "normal" pointer to function cast.
QualType castType = Context->getFunctionType(returnType,
&ArgTypes[0], ArgTypes.size(),
- Exp->getMethodDecl() ? Exp->getMethodDecl()->isVariadic() : false);
+ // If we don't have a method decl, force a variadic cast.
+ Exp->getMethodDecl() ? Exp->getMethodDecl()->isVariadic() : true);
castType = Context->getPointerType(castType);
cast = new CastExpr(castType, cast, SourceLocation());
More information about the cfe-commits
mailing list