]> granicus.if.org Git - clang/commitdiff
Fix printing of parameterized Objective-C interfaces.
authorBob Wilson <bob.wilson@apple.com>
Thu, 1 Oct 2015 00:53:13 +0000 (00:53 +0000)
committerBob Wilson <bob.wilson@apple.com>
Thu, 1 Oct 2015 00:53:13 +0000 (00:53 +0000)
This change was accidentally omitted from Doug's change in r241541.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248975 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclPrinter.cpp
test/Index/comment-objc-parameterized-classes.m

index 374c34ae8efdbed0a486bdd7f29798cd601700c0..e09c331d4f72c81f1906ea2452ca3213401a04cf 100644 (file)
@@ -1088,7 +1088,7 @@ void DeclPrinter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *OID) {
   }
   
   if (SID)
-    Out << " : " << OID->getSuperClass()->getName();
+    Out << " : " << QualType(OID->getSuperClassType(), 0).getAsString(Policy);
 
   // Protocols?
   const ObjCList<ObjCProtocolDecl> &Protocols = OID->getReferencedProtocols();
index 5a928509dfe6d76630c491286a25c74c8810b512..8ee5c6bd6487463133d04ea3bcf96d3b358f7abd 100644 (file)
@@ -17,3 +17,8 @@
 /// A
 @interface A<__covariant T : id, U : NSObject *> : NSObject
 @end
+
+// CHECK: <Declaration>@interface AA : A &lt;id, NSObject *&gt;
+/// AA
+@interface AA : A<id, NSObject *>
+@end