Fix more rewriting of protocol-quialified 'id' type.

(Fixes radar 7607413).

llvm-svn: 95257
This commit is contained in:
Fariborz Jahanian 2010-02-03 21:29:28 +00:00
parent f914be06d2
commit 80c54b05a0
2 changed files with 22 additions and 0 deletions

View File

@ -1995,6 +1995,8 @@ static void scanToNextArgument(const char *&argRef) {
}
bool RewriteObjC::needToScanForQualifiers(QualType T) {
if (T->isObjCQualifiedIdType())
return true;
if (const PointerType *PT = T->getAs<PointerType>()) {
if (PT->getPointeeType()->isObjCQualifiedIdType())
return true;

View File

@ -16,6 +16,26 @@
}
@end
// radar 7607413
@protocol Proto1, Proto2;
@protocol Proto
@end
unsigned char func(id<Proto1, Proto2> inProxy);
id bar(id);
void f() {
id a;
id b = bar((id <Proto>)a);
}
// CHECK-LP: NSConnection /*<NSPortDelegate>*/ *conn = 0;
// CHECK-LP: id /*<NSPortDelegate>*/ *idc = 0;
// CHECK-LP: func(id/*<Proto1, Proto2>*/ inProxy);
// CHECK-LP: bar((id /*<Proto>*/)a);