Skip to content

Commit 7f0387d

Browse files
[clang][ExtractAPI] Add a space between type and name in property declaration fragments
Differential Revision: https://reviews.llvm.org/D130583
1 parent 529bd4f commit 7f0387d

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

clang/lib/ExtractAPI/DeclarationFragments.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForObjCProperty(
692692
return Fragments.appendSpace()
693693
.append(getFragmentsForType(Property->getType(),
694694
Property->getASTContext(), After))
695+
.appendSpace()
695696
.append(Property->getName(),
696697
DeclarationFragments::FragmentKind::Identifier)
697698
.append(std::move(After));

clang/test/ExtractAPI/objc_category.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ + (void)ClassMethod;
317317
"preciseIdentifier": "c:I",
318318
"spelling": "int"
319319
},
320+
{
321+
"kind": "text",
322+
"spelling": " "
323+
},
320324
{
321325
"kind": "identifier",
322326
"spelling": "Property"

clang/test/ExtractAPI/objc_interface.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,10 @@ - (char)getIvar;
462462
"preciseIdentifier": "c:i",
463463
"spelling": "unsigned int"
464464
},
465+
{
466+
"kind": "text",
467+
"spelling": " "
468+
},
465469
{
466470
"kind": "identifier",
467471
"spelling": "Property"

0 commit comments

Comments
 (0)