S += encoding;
} else if (const PointerType *PT = T->getAsPointerType()) {
QualType PointeeTy = PT->getPointeeType();
+ if (isObjcIdType(PointeeTy)) {
+ S += '@';
+ return;
+ }
if (PointeeTy->isCharType()) {
// char pointer types should be encoded as '*' unless it is a
TypeTy **ArgTypes, IdentifierInfo **ArgNames,
AttributeList *AttrList, tok::ObjCKeywordKind MethodDeclKind) {
llvm::SmallVector<ParmVarDecl*, 16> Params;
+
+ // We cannot build type 'id' laziliy. It is needed when checking if a
+ // type is an 'id' (via call to isObjcIdType) even if there is no
+ // need for the dafult 'id' type.
+ // FIXME: Depending on the need to compare to 'id', this may have to go
+ // somewhere else. At this time, this is a good enough place to do type
+ // encoding of methods and ivars for the rewrite client.
+ GetObjcIdType(MethodLoc);
for (unsigned i = 0; i < Sel.getNumArgs(); i++) {
// FIXME: arg->AttrList must be stored too!
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
+ compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
projectDirPath = "";
--- /dev/null
+// RUN: clang -rewrite-test -verify %s
+
+@protocol P1
+- (void) MyProtoMeth : (int **) arg1 : (void*) arg2;
++ (void) MyProtoMeth : (int **) arg1 : (void*) arg2;
+@end
+
+@interface Intf <P1>
+- (char *) MyMeth : (double) arg1 : (char *[12]) arg2;
+- (id) address:(void *)location with:(unsigned **)arg2;
+@end
+
+@implementation Intf
+- (char *) MyMeth : (double) arg1 : (char *[12]) arg2{}
+- (void) MyProtoMeth : (int **) arg1 : (void*) arg2 {}
++ (void) MyProtoMeth : (int **) arg1 : (void*) arg2 {}
+- (id) address:(void *)location with:(unsigned **)arg2{}
+@end