QDoc: Stabilize anonymous type names across LLVM versions


Anonymous types in fully qualified names include file-path
locations by default, such as "(unnamed struct at /path/file.h:67)".
LLVM 21 and 22 differ in how they render these names when the
paths are suppressed: the former preserves the type keyword,
producing "(unnamed struct)", while the latter strips it entirely,
producing bare "(unnamed)". This makes documentation output depend
on the toolchain version, blocking the move to Clang 22 without
regressions.

File-path locations are now suppressed at the printing policy level
rather than stripped from the output. When LLVM 22 omits the tag
keyword from the shortened name, it is recovered from the AST and
injected back, producing consistent "(unnamed struct)" output
regardless of LLVM version. The matching path applies the same
normalization as the header-parsing path, ensuring both sides
produce identical type names for anonymous scope components.

Task-number: QTBUG-144620
Change-Id: Id1134c9f5c9816e063970556b85167ef2059f5b2
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commit862d249c2df579de87242d7327998c6c418bea21
parent64d8d66f51bd4cdcbcbb8ede80243c2fa0036f3b
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeFri, 20 Mar 2026 15:47:09 +0100