diff --git a/clang/lib/ExtractAPI/DeclarationFragments.cpp b/clang/lib/ExtractAPI/DeclarationFragments.cpp --- a/clang/lib/ExtractAPI/DeclarationFragments.cpp +++ b/clang/lib/ExtractAPI/DeclarationFragments.cpp @@ -434,6 +434,7 @@ return Fragments.append(getFragmentsForType(T, Var->getASTContext(), After)) .appendSpace() .append(Var->getName(), DeclarationFragments::FragmentKind::Identifier) + .append(";", DeclarationFragments::FragmentKind::Text) .append(std::move(After)); } @@ -551,6 +552,7 @@ getFragmentsForType(Field->getType(), Field->getASTContext(), After)) .appendSpace() .append(Field->getName(), DeclarationFragments::FragmentKind::Identifier) + .append(";", DeclarationFragments::FragmentKind::Text) .append(std::move(After)); } diff --git a/clang/test/ExtractAPI/anonymous_record_no_typedef.c b/clang/test/ExtractAPI/anonymous_record_no_typedef.c --- a/clang/test/ExtractAPI/anonymous_record_no_typedef.c +++ b/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": { diff --git a/clang/test/ExtractAPI/global_record.c b/clang/test/ExtractAPI/global_record.c --- a/clang/test/ExtractAPI/global_record.c +++ b/clang/test/ExtractAPI/global_record.c @@ -68,6 +68,10 @@ { "kind": "identifier", "spelling": "num" + }, + { + "kind": "text", + "spelling": ";" } ], "identifier": { diff --git a/clang/test/ExtractAPI/global_record_multifile.c b/clang/test/ExtractAPI/global_record_multifile.c --- a/clang/test/ExtractAPI/global_record_multifile.c +++ b/clang/test/ExtractAPI/global_record_multifile.c @@ -70,6 +70,10 @@ { "kind": "identifier", "spelling": "num" + }, + { + "kind": "text", + "spelling": ";" } ], "identifier": { diff --git a/clang/test/ExtractAPI/known_files_only.c b/clang/test/ExtractAPI/known_files_only.c --- a/clang/test/ExtractAPI/known_files_only.c +++ b/clang/test/ExtractAPI/known_files_only.c @@ -66,6 +66,10 @@ { "kind": "identifier", "spelling": "num" + }, + { + "kind": "text", + "spelling": ";" } ], "identifier": { diff --git a/clang/test/ExtractAPI/language.c b/clang/test/ExtractAPI/language.c --- a/clang/test/ExtractAPI/language.c +++ b/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": { diff --git a/clang/test/ExtractAPI/objc_interface.m b/clang/test/ExtractAPI/objc_interface.m --- a/clang/test/ExtractAPI/objc_interface.m +++ b/clang/test/ExtractAPI/objc_interface.m @@ -579,6 +579,10 @@ { "kind": "identifier", "spelling": "Ivar" + }, + { + "kind": "text", + "spelling": ";" } ], "identifier": { diff --git a/clang/test/ExtractAPI/relative_include.m b/clang/test/ExtractAPI/relative_include.m --- a/clang/test/ExtractAPI/relative_include.m +++ b/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": { diff --git a/clang/test/ExtractAPI/struct.c b/clang/test/ExtractAPI/struct.c --- a/clang/test/ExtractAPI/struct.c +++ b/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": { diff --git a/clang/test/ExtractAPI/typedef_struct_enum.c b/clang/test/ExtractAPI/typedef_struct_enum.c --- a/clang/test/ExtractAPI/typedef_struct_enum.c +++ b/clang/test/ExtractAPI/typedef_struct_enum.c @@ -328,6 +328,10 @@ { "kind": "identifier", "spelling": "bar" + }, + { + "kind": "text", + "spelling": ";" } ], "identifier": { diff --git a/clang/test/ExtractAPI/underscored.c b/clang/test/ExtractAPI/underscored.c --- a/clang/test/ExtractAPI/underscored.c +++ b/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": {