]> granicus.if.org Git - clang/commitdiff
Change the ObjC type encoding for block pointer types to "@?" (for consistency with...
authorSteve Naroff <snaroff@apple.com>
Mon, 2 Feb 2009 18:24:29 +0000 (18:24 +0000)
committerSteve Naroff <snaroff@apple.com>
Mon, 2 Feb 2009 18:24:29 +0000 (18:24 +0000)
This fixes <rdar://problem/6538564> 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

lib/AST/ASTContext.cpp

index c43ae78c9f587df6a051434d32871ee6933c9738..7892c84f92bb0edb881b397fabb0554b0eda59f7 100644 (file)
@@ -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();