This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG422bcd10c48b: [clang][ExtractAPI] Add semicolons to vars and
fields and to test reference JSON (authored by evelez7).
Changed prior to commit:
https://reviews.llvm.org/D154038?vs=536245&id=545925#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154038/new/
https://reviews.llvm.org/D154038
Files:
clang/lib/ExtractAPI/DeclarationFragments.cpp
clang/test/ExtractAPI/anonymous_record_no_typedef.c
clang/test/ExtractAPI/global_record.c
clang/test/ExtractAPI/global_record_multifile.c
clang/test/ExtractAPI/known_files_only.c
clang/test/ExtractAPI/language.c
clang/test/ExtractAPI/objc_interface.m
clang/test/ExtractAPI/relative_include.m
clang/test/ExtractAPI/struct.c
clang/test/ExtractAPI/typedef_struct_enum.c
clang/test/ExtractAPI/underscored.c
Index: clang/test/ExtractAPI/underscored.c
===================================================================
--- clang/test/ExtractAPI/underscored.c
+++ clang/test/ExtractAPI/underscored.c
@@ -85,6 +85,10 @@
{
"kind": "identifier",
"spelling": "exposed_global"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
@@ -190,6 +194,10 @@
{
"kind": "identifier",
"spelling": "a"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
Index: clang/test/ExtractAPI/typedef_struct_enum.c
===================================================================
--- clang/test/ExtractAPI/typedef_struct_enum.c
+++ clang/test/ExtractAPI/typedef_struct_enum.c
@@ -328,6 +328,10 @@
{
"kind": "identifier",
"spelling": "bar"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
Index: clang/test/ExtractAPI/struct.c
===================================================================
--- clang/test/ExtractAPI/struct.c
+++ clang/test/ExtractAPI/struct.c
@@ -161,6 +161,10 @@
{
"kind": "identifier",
"spelling": "Red"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
@@ -213,6 +217,10 @@
{
"kind": "identifier",
"spelling": "Green"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
@@ -265,6 +273,10 @@
{
"kind": "identifier",
"spelling": "Blue"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
@@ -317,6 +329,10 @@
{
"kind": "identifier",
"spelling": "Alpha"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"docComment": {
Index: clang/test/ExtractAPI/relative_include.m
===================================================================
--- clang/test/ExtractAPI/relative_include.m
+++ clang/test/ExtractAPI/relative_include.m
@@ -102,6 +102,10 @@
{
"kind": "identifier",
"spelling": "MyInt"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
@@ -153,6 +157,10 @@
{
"kind": "identifier",
"spelling": "MyChar"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
Index: clang/test/ExtractAPI/objc_interface.m
===================================================================
--- clang/test/ExtractAPI/objc_interface.m
+++ clang/test/ExtractAPI/objc_interface.m
@@ -579,6 +579,10 @@
{
"kind": "identifier",
"spelling": "Ivar"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
Index: clang/test/ExtractAPI/language.c
===================================================================
--- clang/test/ExtractAPI/language.c
+++ clang/test/ExtractAPI/language.c
@@ -70,6 +70,10 @@
{
"kind": "identifier",
"spelling": "c"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
@@ -150,6 +154,10 @@
{
"kind": "identifier",
"spelling": "objc"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
Index: clang/test/ExtractAPI/known_files_only.c
===================================================================
--- clang/test/ExtractAPI/known_files_only.c
+++ clang/test/ExtractAPI/known_files_only.c
@@ -66,6 +66,10 @@
{
"kind": "identifier",
"spelling": "num"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
Index: clang/test/ExtractAPI/global_record_multifile.c
===================================================================
--- clang/test/ExtractAPI/global_record_multifile.c
+++ clang/test/ExtractAPI/global_record_multifile.c
@@ -70,6 +70,10 @@
{
"kind": "identifier",
"spelling": "num"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
Index: clang/test/ExtractAPI/global_record.c
===================================================================
--- clang/test/ExtractAPI/global_record.c
+++ clang/test/ExtractAPI/global_record.c
@@ -68,6 +68,10 @@
{
"kind": "identifier",
"spelling": "num"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
Index: clang/test/ExtractAPI/anonymous_record_no_typedef.c
===================================================================
--- clang/test/ExtractAPI/anonymous_record_no_typedef.c
+++ clang/test/ExtractAPI/anonymous_record_no_typedef.c
@@ -316,6 +316,10 @@
{
"kind": "identifier",
"spelling": "type"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
@@ -367,6 +371,10 @@
{
"kind": "identifier",
"spelling": "information"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
}
],
"identifier": {
Index: clang/lib/ExtractAPI/DeclarationFragments.cpp
===================================================================
--- clang/lib/ExtractAPI/DeclarationFragments.cpp
+++ clang/lib/ExtractAPI/DeclarationFragments.cpp
@@ -389,7 +389,8 @@
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 @@
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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits