From: Fariborz Jahanian Date: Sat, 21 Feb 2009 19:08:45 +0000 (+0000) Subject: Fix a bug whereby a pointer to a __weak was not recognized X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ae1f058902ffd92207af678e1c62e43258127c6;p=clang Fix a bug whereby a pointer to a __weak was not recognized as __weak (objc2 gc specific). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65238 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index bf36f7f6ed..ab7acc449f 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -1774,6 +1774,8 @@ inline QualType::GCAttrTypes QualType::getObjCGCAttr() const { return AT->getElementType().getObjCGCAttr(); if (const ExtQualType *EXTQT = dyn_cast(CT)) return EXTQT->getObjCGCAttr(); + if (const PointerType *PT = CT->getAsPointerType()) + return PT->getPointeeType().getObjCGCAttr(); return GCNone; }