Closed
Description
IWYU's hacky forward-declare printer broke yesterday when 9f57b65 landed.
For the following declaration:
template <typename T>
class FinalTemplate final {};decl->print() generates:
template <typename T> class final FinalTemplate final {\n}So while it's nice that final ends up in the right place, it's a little annoying that it's printed both before and after the decl name.
The reason for that is DeclPrinter::prettyPrintAttributes, which emits all decl attributes, and is called before the new final code in DeclPrinter::VisitCXXRecordDecl.
There's a bunch of things wrong with our current parsing and rewriting of the decl->print() output, so I'll look into hardening that, but I figured this might hit someone else.
Not sure why it doesn't show up in your tests. Does the Hover code do any additional cleanup?
Activity