diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/Type.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index 327e623aafd..31565080633 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -476,20 +476,20 @@ const ObjCInterfaceType *Type::getAsObjCInterfaceType() const { // 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 { |