diff options
author | Steve Naroff <snaroff@apple.com> | 2008-03-18 02:02:04 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-03-18 02:02:04 +0000 |
commit | 2679e4889fbe1a5582d84363857e020354cedeed (patch) | |
tree | 56f1ca43c9f3680a4c876e2b5e364783e46682e1 /Driver/RewriteTest.cpp | |
parent | 2a22816a1a3f08d2154f2ce319ff1c66f2d72978 (diff) |
Fix <rdar://problem/5716940> rewriter generates invalid C code when no selector found.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r-- | Driver/RewriteTest.cpp | 3 |
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()); |