the attribute set on them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68844
91177308-0d34-0410-b5e6-
96231b3b80d8
else if (Ty->isPointerType())
return getObjCGCAttrKind(Ty->getAsPointerType()->getPointeeType());
}
+ // Non-pointers have none gc'able attribute regardless of the attribute
+ // set on them.
+ else if (!isObjCObjectPointerType(Ty) && !Ty->isPointerType())
+ return QualType::GCNone;
}
return GCAttrs;
}
--- /dev/null
+// RUN: clang-cc -emit-llvm -o %t %s
+
+@interface PDFViewPrivateVars
+{
+@public
+ __attribute__((objc_gc(strong))) char *addedTooltips;
+}
+@end
+
+@interface PDFView
+{
+ PDFViewPrivateVars *_pdfPriv;
+}
+@end
+
+@implementation PDFView
+- (void) addTooltipsForPage
+{
+ _pdfPriv->addedTooltips[4] = 1;
+}
+@end
+