mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-15 04:00:56 +00:00
Fix <rdar://problem/5716940> rewriter generates invalid C code when no selector found.
llvm-svn: 48479
This commit is contained in:
parent
69683fa5ee
commit
327f0f4c3a
@ -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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user