evelez7 created this revision. Herald added a reviewer: ributzka. Herald added a project: All. evelez7 requested review of this revision. Herald added a reviewer: dang. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Repository: rG LLVM Github Monorepo 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 @@ -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)); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits