[PATCH] D56924: Handle ObjCCategoryDecl class extensions for print

David Goldman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 18 11:29:38 PST 2019


dgoldman created this revision.
Herald added a subscriber: cfe-commits.

Since class extensions do not have a name, (class extension) is
used instead.


Repository:
  rC Clang

https://reviews.llvm.org/D56924

Files:
  lib/AST/Decl.cpp


Index: lib/AST/Decl.cpp
===================================================================
--- lib/AST/Decl.cpp
+++ lib/AST/Decl.cpp
@@ -1605,6 +1605,11 @@
         OS << *ED;
       else
         continue;
+    } else if (const auto *CD = dyn_cast<ObjCCategoryDecl>(DC)) {
+      if (CD->IsClassExtension())
+         OS << "(class extension)";
+      else
+        OS << *CD;
     } else {
       OS << *cast<NamedDecl>(DC);
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56924.182564.patch
Type: text/x-patch
Size: 435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190118/b0c439f2/attachment.bin>


More information about the cfe-commits mailing list