From: Steve Naroff Date: Mon, 2 Feb 2009 18:24:29 +0000 (+0000) Subject: Change the ObjC type encoding for block pointer types to "@?" (for consistency with... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21a98b188857d690aa4510c52ac4317ffa0908a8;p=clang Change the ObjC type encoding for block pointer types to "@?" (for consistency with GCC). This fixes clang ObjC rewriter: Wrong encoding emitted for methods with Block parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63534 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index c43ae78c9f..7892c84f92 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -2100,7 +2100,7 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S, else S += 'i'; } else if (T->isBlockPointerType()) { - S += '^'; // This type string is the same as general pointers. + S += "@?"; // Unlike a pointer-to-function, which is "^?". } else if (T->isObjCInterfaceType()) { // @encode(class_name) ObjCInterfaceDecl *OI = T->getAsObjCInterfaceType()->getDecl();