[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 13 06:32:42 PDT 2024
vgvassilev wrote:
> > With .PolishForDeclaration=true, there are NO final specifiers (which is what we want to produce forward decls in IWYU)
>
> This is actually a regression in this PR, and it breaks the clangd test added here: [9f57b65](https://github.com/llvm/llvm-project/commit/9f57b65a272817752aa00e2fb94154e6eed1d0ec) (the patch that originally led to double `final`s).
>
> EDIT: It looks like `prettyPrintAttributes` is only intended for semantic attributes, whereas clangd wanted to preserve as-written `final` keyword. So I wonder if this change needs to be tweaked a little: https://github.com/llvm/llvm-project/pull/88600/files#diff-81d69bc555945d6582a758e0c094ff870cbc38697501ad7415694ee30c567dbfL1085
I've added a fix for your example. Can you provide a test case for the clangd use-case?
https://github.com/llvm/llvm-project/pull/88600
More information about the cfe-commits
mailing list