]> granicus.if.org Git - clang/commitdiff
[ASTPrinter] 'SEL' isn't a ObjCObjectPointer, so we don't need to handle it in TypePr...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 6 Mar 2014 15:31:56 +0000 (15:31 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 6 Mar 2014 15:31:56 +0000 (15:31 +0000)
Suggested by Jordan.

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

lib/AST/TypePrinter.cpp

index 9630ecd3574d191c1c63528f2e9bc68606328ccc..26c3c9903dff52932e94fcbf4ce2e405bfe43871 100644 (file)
@@ -1281,12 +1281,12 @@ void TypePrinter::printObjCObjectPointerBefore(const ObjCObjectPointerType *T,
   T->getPointeeType().getLocalQualifiers().print(OS, Policy,
                                                 /*appendSpaceIfNonEmpty=*/true);
 
+  assert(!T->isObjCSelType());
+
   if (T->isObjCIdType() || T->isObjCQualifiedIdType())
     OS << "id";
   else if (T->isObjCClassType() || T->isObjCQualifiedClassType())
     OS << "Class";
-  else if (T->isObjCSelType())
-    OS << "SEL";
   else
     OS << T->getInterfaceDecl()->getName();
   
@@ -1303,8 +1303,7 @@ void TypePrinter::printObjCObjectPointerBefore(const ObjCObjectPointerType *T,
   }
   
   if (!T->isObjCIdType() && !T->isObjCQualifiedIdType() &&
-      !T->isObjCClassType() && !T->isObjCQualifiedClassType() &&
-      !T->isObjCSelType()) {
+      !T->isObjCClassType() && !T->isObjCQualifiedClassType()) {
     OS << " *"; // Don't forget the implicit pointer.
   } else {
     spaceBeforePlaceHolder(OS);