New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong parameter types in extracted function #640
Comments
Similar to #524 |
arichardson
pushed a commit
to arichardson/llvm-project
that referenced
this issue
Mar 29, 2021
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: clangd/clangd#640 (ExtractFunction) clangd/clangd#264 (ExpandAuto) First point of clangd/clangd#524 Differential Revision: https://reviews.llvm.org/D94259
mem-frob
pushed a commit
to draperlaboratory/hope-llvm-project
that referenced
this issue
Oct 7, 2022
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: clangd/clangd#640 (ExtractFunction) clangd/clangd#264 (ExpandAuto) First point of clangd/clangd#524 Differential Revision: https://reviews.llvm.org/D94259
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Extracting from this function:
results in broken parameter types for
std::vector
:The problem is probably somewhere in
printType()
/getQualification()
functions which yield a wrong string representation of a type.System information
Output of
clangd --version
: Ubuntu clangd version 11.0.1-++20201218093155+43ff75f2c3fe-1exp120201218203809.158Editor/LSP plugin: vscode 1.52.1, clangd 0.1.8
Operating system: Ubuntu 20.04
The text was updated successfully, but these errors were encountered: