[clang] [clang-tools-extra] [clangd] Add missing SymbolKind cases to YAML serialization (PR #222070)
Aleksandr Platonov via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 10 23:57:28 PDT 2026
================
@@ -260,6 +261,33 @@ TEST(SerializationTest, BinaryConversions) {
UnorderedElementsAreArray(yamlFromRelations(*In->Relations)));
}
+// Every SymbolKind must have a YAML spelling, otherwise writing the index
+// produces invalid YAML (or aborts with assertions enabled).
+TEST(SerializationTest, YAMLSymbolKindRoundTrip) {
+ SymbolSlab::Builder Builder;
+ for (unsigned K = 0; K <= static_cast<unsigned>(index::SymbolKind::Concept);
----------------
ArcsinX wrote:
Oh, sorry. I didn't expect that adding `Count` leads to clang/libclang changes. Fixing a self-contained bug in clangd should not lead to clang/libclang changes only to ensure that newly added test covers all symbol kinds.
So, can you please revert Count addition? loop in your test can be just from Unknow till Concept.
Sorry, once again.
https://github.com/llvm/llvm-project/pull/222070
More information about the cfe-commits
mailing list