[PATCH] D123045: [clang][extract-api] Fix small issues with SymbolGraphSerializer
Victoria Mitchell via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 4 14:17:45 PDT 2022
QuietMisdreavus added a comment.
After a quick scan comparing the current output of these symbol graphs with the primary library used for reading them <https://github.com/apple/swift-docc-symbolkit>, the last thing i can spot that's "off" is that the "function signature" is currently being serialized under a `parameters` field instead of the required `functionSignature`.
Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:510
> What's the cost/would it worth it to wrap the `emplace_back`s and `pop_back`s of `PathComponentContext` in meaningful APIs like `enterPathComponentContext` and `exitPathComponentContext`?
> That way the code is more self-explanatory and easier to read. It took me some time and mental resources to figure out why the `pop_back` is placed here.
What's the use of having the `emplace_back` call inside `serializeAPIRecord` but to pop it outside? It seems like it's easier to mess up for new kinds of records.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits