mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 12:36:06 +00:00

Underscore-uglified identifiers are used in standard library implementations to guard against collisions with macros, and they hurt readability considerably. (Consider `push_back(Tp_ &&__value)` vs `push_back(Tp value)`. When we're describing an interface, the exact names of parameters are not critical so we can drop these prefixes. This patch adds a new PrintingPolicy flag that can applies this stripping when recursively printing pieces of AST. We set it in code completion/signature help, and in clangd's hover display. All three features also do a bit of manual poking at names, so fix up those too. Fixes https://github.com/clangd/clangd/issues/736 Differential Revision: https://reviews.llvm.org/D116387