[clang] [clang-tools-extra] [clangd] Add missing SymbolKind cases to YAML serialization (PR #222070)

Andre Sun via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 11 06:59:52 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);
----------------
and2049 wrote:

no problem, I've removed Count and reverted the clang, libclang, and clangd switch changes to how they were originally. The test now iterates from Unknown to Concept with <=. 

https://github.com/llvm/llvm-project/pull/222070


More information about the cfe-commits mailing list