aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Driver/RewriteTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp
index 4f27ab9005..239fa2d026 100644
--- a/Driver/RewriteTest.cpp
+++ b/Driver/RewriteTest.cpp
@@ -2074,7 +2074,8 @@ Stmt *RewriteTest::SynthMessageExpr(ObjCMessageExpr *Exp) {
// 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());