Do not issue bogus error on __weak/__strong ivar access.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65583 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 327e623..3156508 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -476,20 +476,20 @@
// There is no sugar for ObjCInterfaceType's, just return the canonical
// type pointer if it is the right class. There is no typedef information to
// return and these cannot be Address-space qualified.
- return dyn_cast<ObjCInterfaceType>(CanonicalType);
+ return dyn_cast<ObjCInterfaceType>(CanonicalType.getUnqualifiedType());
}
const ObjCQualifiedInterfaceType *
Type::getAsObjCQualifiedInterfaceType() const {
// There is no sugar for ObjCQualifiedInterfaceType's, just return the
// canonical type pointer if it is the right class.
- return dyn_cast<ObjCQualifiedInterfaceType>(CanonicalType);
+ return dyn_cast<ObjCQualifiedInterfaceType>(CanonicalType.getUnqualifiedType());
}
const ObjCQualifiedIdType *Type::getAsObjCQualifiedIdType() const {
// There is no sugar for ObjCQualifiedIdType's, just return the canonical
// type pointer if it is the right class.
- return dyn_cast<ObjCQualifiedIdType>(CanonicalType);
+ return dyn_cast<ObjCQualifiedIdType>(CanonicalType.getUnqualifiedType());
}
const TemplateTypeParmType *Type::getAsTemplateTypeParmType() const {