r195061 - ObjectiveC ARC. Adopt objc_bridge attribute

jahanian fjahanian at apple.com
Mon Nov 18 16:29:59 PST 2013


On Nov 18, 2013, at 4:27 PM, Douglas Gregor <dgregor at apple.com> wrote:

> 
> On Nov 18, 2013, at 4:09 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
> 
>> Author: fjahanian
>> Date: Mon Nov 18 18:09:48 2013
>> New Revision: 195061
>> \
>> +static inline ObjCBridgeAttr *getObjCBridgeAttr(const TypedefType *TD) {
>> +  TypedefNameDecl *TDNDecl = TD->getDecl();
>> +  QualType QT = TDNDecl->getUnderlyingType();
>> +  if (QT->isPointerType()) {
>> +    QT = QT->getPointeeType();
>> +    if (QT->isStructureType() || QT->isUnionType() || QT->isClassType())
> 
> How about
> 
> 	if (const RecordType *RT = QT->getAs<RecordType>())

We also get @interface with this.

- Fariborz





More information about the cfe-commits mailing list