diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index c9238e95210125..ecbbd73e19fb45 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -5569,7 +5569,7 @@ class ObjCTypeParamType : public Type, public: bool isSugared() const { return true; } - QualType desugar() const; + QualType desugar() const { return getCanonicalTypeInternal(); } static bool classof(const Type *T) { return T->getTypeClass() == ObjCTypeParam; diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index 4d54ea1061edcd..4fed5b410b1724 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -663,10 +663,6 @@ ObjCTypeParamType::ObjCTypeParamType(const ObjCTypeParamDecl *D, initialize(protocols); } -QualType ObjCTypeParamType::desugar() const { - return getDecl()->getUnderlyingType(); -} - ObjCObjectType::ObjCObjectType(QualType Canonical, QualType Base, ArrayRef typeArgs, ArrayRef protocols, diff --git a/clang/test/SemaObjC/parameterized_classes_subst.m b/clang/test/SemaObjC/parameterized_classes_subst.m index b6d884760d294e..d14a6e9deb4066 100644 --- a/clang/test/SemaObjC/parameterized_classes_subst.m +++ b/clang/test/SemaObjC/parameterized_classes_subst.m @@ -467,17 +467,3 @@ - (void)mapUsingBlock:(id (^)(id))block { - (void)mapUsingBlock2:(id)block { // expected-warning{{conflicting parameter types in implementation}} } @end - -// -------------------------------------------------------------------------- -// Use a type parameter as a type argument. -// -------------------------------------------------------------------------- -// Type bounds in a category/extension are omitted. rdar://problem/54329242 -@interface ParameterizedContainer> -- (ParameterizedContainer *)inInterface; -@end -@interface ParameterizedContainer (Cat) -- (ParameterizedContainer *)inCategory; -@end -@interface ParameterizedContainer () -- (ParameterizedContainer *)inExtension; -@end