This will be used together with D40548 for the global index source (experimental).
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Nice! just nits
clangd/index/SymbolFromYAML.cpp | ||
---|---|---|
32 ↗ | (On Diff #126742) | what does NP stand for? |
44 ↗ | (On Diff #126742) | Nit: for readability, I suggest you encode as a hex string instead. We don't yet have operator<< for SymbolID, but I think we should, and it should be consistent. |
clangd/index/SymbolFromYAML.h | ||
1 ↗ | (On Diff #126742) | nit: SymbolFromYAML.h seems slightly off for the file, because you support both conversions (and also multiple symbols) Consider just YAML.h? |
8 ↗ | (On Diff #126742) | File comment, describing what's going on here, use cases. In particular, I'd note that the format is designed for simplicity but isn't a suitable/efficient store and isn't intended for real use by end-users. |
23 ↗ | (On Diff #126742) | We may have multiple slabs, e.g. if we want to dump the dynamic index. |
unittests/clangd/SymbolCollectorTests.cpp | ||
108 ↗ | (On Diff #126742) | round-trip is good to test the serialization, but can you add a separate test case loading a simple symbol from an actual YAML string? |
Thanks for the comments!
clangd/index/SymbolFromYAML.cpp | ||
---|---|---|
32 ↗ | (On Diff #126742) | Ah, P is a typo here. N stands for Normalized. Renamed it to NormalizedXXX. |
44 ↗ | (On Diff #126742) | Good idea. Done. |
clangd/index/SymbolFromYAML.h | ||
1 ↗ | (On Diff #126742) | YAML seems too general. Named it SymbolYAML indicating the conversion between Symbol and YAML. |