r248975 - Fix printing of parameterized Objective-C interfaces.

Bob Wilson via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 30 17:53:13 PDT 2015


Author: bwilson
Date: Wed Sep 30 19:53:13 2015
New Revision: 248975

URL: http://llvm.org/viewvc/llvm-project?rev=248975&view=rev
Log:
Fix printing of parameterized Objective-C interfaces.

This change was accidentally omitted from Doug's change in r241541.

Modified:
    cfe/trunk/lib/AST/DeclPrinter.cpp
    cfe/trunk/test/Index/comment-objc-parameterized-classes.m

Modified: cfe/trunk/lib/AST/DeclPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclPrinter.cpp?rev=248975&r1=248974&r2=248975&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclPrinter.cpp (original)
+++ cfe/trunk/lib/AST/DeclPrinter.cpp Wed Sep 30 19:53:13 2015
@@ -1088,7 +1088,7 @@ void DeclPrinter::VisitObjCInterfaceDecl
   }
   
   if (SID)
-    Out << " : " << OID->getSuperClass()->getName();
+    Out << " : " << QualType(OID->getSuperClassType(), 0).getAsString(Policy);
 
   // Protocols?
   const ObjCList<ObjCProtocolDecl> &Protocols = OID->getReferencedProtocols();

Modified: cfe/trunk/test/Index/comment-objc-parameterized-classes.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/comment-objc-parameterized-classes.m?rev=248975&r1=248974&r2=248975&view=diff
==============================================================================
--- cfe/trunk/test/Index/comment-objc-parameterized-classes.m (original)
+++ cfe/trunk/test/Index/comment-objc-parameterized-classes.m Wed Sep 30 19:53:13 2015
@@ -17,3 +17,8 @@
 /// A
 @interface A<__covariant T : id, U : NSObject *> : NSObject
 @end
+
+// CHECK: <Declaration>@interface AA : A <id, NSObject *>
+/// AA
+ at interface AA : A<id, NSObject *>
+ at end




More information about the cfe-commits mailing list