[clangd] Fix type printing in the presence of qualifiers
When printing QualType with qualifiers like "const", or pointing to an elaborated type, we would print garbage like: std::const std::vector<int>& with the initial std:: being calculated correctly, but inserted in the wrong place and the second std:: not removed (due to elaborated type). This affected, among others, ExtractFunction and ExpandAuto tweaks. This change introduces a new callback to PrintingPolicy, which allows us to influence the printing of namespace qualifiers. In the future, the same callback can be used to improve handling of "using namespace" directives as well. Fixes: https://github.com/clangd/clangd/issues/640 (ExtractFunction) https://github.com/clangd/clangd/issues/264 (ExpandAuto) First point of https://github.com/clangd/clangd/issues/524 Differential Revision: https://reviews.llvm.org/D94259
Loading
Please sign in to comment