mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-13 19:24:21 +00:00
[clang][ExtractAPI] Add semicolons to vars and fields and to test reference JSON
Differential Revision: https://reviews.llvm.org/D154038
This commit is contained in:
parent
8d359b2472
commit
422bcd10c4
@ -389,7 +389,8 @@ DeclarationFragmentsBuilder::getFragmentsForVar(const VarDecl *Var) {
|
||||
return Fragments.append(getFragmentsForType(T, Var->getASTContext(), After))
|
||||
.appendSpace()
|
||||
.append(Var->getName(), DeclarationFragments::FragmentKind::Identifier)
|
||||
.append(std::move(After));
|
||||
.append(std::move(After))
|
||||
.append(";", DeclarationFragments::FragmentKind::Text);
|
||||
}
|
||||
|
||||
DeclarationFragments
|
||||
@ -495,7 +496,8 @@ DeclarationFragmentsBuilder::getFragmentsForField(const FieldDecl *Field) {
|
||||
return getFragmentsForType(Field->getType(), Field->getASTContext(), After)
|
||||
.appendSpace()
|
||||
.append(Field->getName(), DeclarationFragments::FragmentKind::Identifier)
|
||||
.append(std::move(After));
|
||||
.append(std::move(After))
|
||||
.append(";", DeclarationFragments::FragmentKind::Text);
|
||||
}
|
||||
|
||||
DeclarationFragments
|
||||
|
@ -316,6 +316,10 @@ struct Vehicle {
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "type"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
@ -367,6 +371,10 @@ struct Vehicle {
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "information"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
|
@ -68,6 +68,10 @@ char unavailable __attribute__((unavailable));
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "num"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
|
@ -70,6 +70,10 @@ char unavailable __attribute__((unavailable));
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "num"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
|
@ -66,6 +66,10 @@ struct Foo { int a; };
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "num"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
|
@ -70,6 +70,10 @@ char objc;
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "c"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
@ -150,6 +154,10 @@ char objc;
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "objc"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
|
@ -579,6 +579,10 @@
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "Ivar"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
|
@ -102,6 +102,10 @@ int OtherInt;
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "MyInt"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
@ -153,6 +157,10 @@ int OtherInt;
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "MyChar"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
|
@ -161,6 +161,10 @@ struct Color {
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "Red"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
@ -213,6 +217,10 @@ struct Color {
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "Green"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
@ -265,6 +273,10 @@ struct Color {
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "Blue"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
@ -317,6 +329,10 @@ struct Color {
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "Alpha"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"docComment": {
|
||||
|
@ -328,6 +328,10 @@ struct Foo {
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "bar"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
|
@ -85,6 +85,10 @@ typedef _HiddenTypedef ExposedTypedefToHidden;
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "exposed_global"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
@ -190,6 +194,10 @@ typedef _HiddenTypedef ExposedTypedefToHidden;
|
||||
{
|
||||
"kind": "identifier",
|
||||
"spelling": "a"
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"spelling": ";"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
|
Loading…
Reference in New Issue
Block a user