[PATCH] D130583: [clang][ExtractAPI] Add a space between type and name in property declaration fragments

Daniel Grumberg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 26 09:29:53 PDT 2022


dang created this revision.
dang added reviewers: zixuw, QuietMisdreavus.
Herald added a reviewer: ributzka.
Herald added a project: All.
dang requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130583

Files:
  clang/lib/ExtractAPI/DeclarationFragments.cpp
  clang/test/ExtractAPI/objc_category.m
  clang/test/ExtractAPI/objc_interface.m


Index: clang/test/ExtractAPI/objc_interface.m
===================================================================
--- clang/test/ExtractAPI/objc_interface.m
+++ clang/test/ExtractAPI/objc_interface.m
@@ -462,6 +462,10 @@
           "preciseIdentifier": "c:i",
           "spelling": "unsigned int"
         },
+        {
+          "kind": "text",
+          "spelling": " "
+        },
         {
           "kind": "identifier",
           "spelling": "Property"
Index: clang/test/ExtractAPI/objc_category.m
===================================================================
--- clang/test/ExtractAPI/objc_category.m
+++ clang/test/ExtractAPI/objc_category.m
@@ -317,6 +317,10 @@
           "preciseIdentifier": "c:I",
           "spelling": "int"
         },
+        {
+          "kind": "text",
+          "spelling": " "
+        },
         {
           "kind": "identifier",
           "spelling": "Property"
Index: clang/lib/ExtractAPI/DeclarationFragments.cpp
===================================================================
--- clang/lib/ExtractAPI/DeclarationFragments.cpp
+++ clang/lib/ExtractAPI/DeclarationFragments.cpp
@@ -692,6 +692,7 @@
   return Fragments.appendSpace()
       .append(getFragmentsForType(Property->getType(),
                                   Property->getASTContext(), After))
+      .appendSpace()
       .append(Property->getName(),
               DeclarationFragments::FragmentKind::Identifier)
       .append(std::move(After));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130583.447740.patch
Type: text/x-patch
Size: 1474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220726/546d99ba/attachment-0001.bin>


More information about the cfe-commits mailing list