When using clangd as a language server in an editor such as vscode, it is currently hard to use the List Document Symbols feature with files where a function is overloaded many times.
Other language servers (such as the one provided by Microsoft) return more than just the symbol's name for the view, namely it also returns the parameters of the (member) functions in the file.
i.e. clang's current view:
versus Microsoft's current view:
This patch adds the parameter information to symbol listings of free functions and member functions, resulting in the following symbol navigation view:
This patch has been tested with vscode V1.80.2 and the vscode clangd extension version v0.1.24
No additional changes were necessary to either clang(d) or the vscode extension for the fix to work (other than specifying the custom clangd executable)
DocumentSymbol is already a structure modelling LSP, this function's job is to serialize it, not rearrange the fields.
Moreover, we shouldn't render the detail into a string and then go back later and attempt to parse it, but just produce the data we want in the first place (in FindSymbols.cpp, where it can be unittested).