[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 08:27:03 PDT 2024


vgvassilev wrote:

> * IWYU uses `PolishForDeclaration` to get a valid _declaration_, and then does [some very hacky heuristic post-processing](https://github.com/include-what-you-use/include-what-you-use/blob/125341c412ceee9233ece8973848b49e770a9b82/iwyu_output.cc#L469) to turn it into a forward-decl.

The [ROOT](http://root.cern) usecase of the Cling interpreter has similar infrastructure and it works at scale couple of million lines of scientific codes: https://github.com/root-project/root/blob/master/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp. There are some tests that one can look at: https://github.com/root-project/root/tree/master/interpreter/cling/test/Autoloading

I am wondering if that'd be interesting and if so, maybe we can share it between both projects via upstreaming to Clang...

https://github.com/llvm/llvm-project/pull/88600


More information about the cfe-commits mailing list