aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
diff options
context:
space:
mode:
authorDaniel Grumberg <dgrumberg@apple.com>2023-03-29 12:04:30 +0100
committerDaniel Grumberg <dgrumberg@apple.com>2023-03-29 16:32:26 +0100
commit1cfe1e732ad8e8148f6fa8fc0f0c86f4b965d567 (patch)
tree9e2028fdd5c543af84c501121c4019403870549e /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
parent90025187f014c4699b9869428a06e683c1bac232 (diff)
downloadllvm-1cfe1e732ad8e8148f6fa8fc0f0c86f4b965d567.zip
llvm-1cfe1e732ad8e8148f6fa8fc0f0c86f4b965d567.tar.gz
llvm-1cfe1e732ad8e8148f6fa8fc0f0c86f4b965d567.tar.bz2
[clang][ExtractAPI] Add queried symbol to parent contexts in libclang
Ensure that the current symbol is added to the parent contexts in the output of libclang function for generating symbol graphs for single symbols. Differential Revision: https://reviews.llvm.org/D147138
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
-rw-r--r--clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
index 8a98f5c..7676c74 100644
--- a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
+++ b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
@@ -547,10 +547,6 @@ Array generateParentContexts(const RecordTy &Record, const APISet &API,
serializeParentContext(PC, Lang));
});
- // The last component would be the record itself so let's remove it.
- if (!ParentContexts.empty())
- ParentContexts.pop_back();
-
return ParentContexts;
}