QDoc: Fix template parameter matching


When documenting template classes, QDoc matches documentation
commands to their header declarations by comparing parameter type
strings. A fallback to canonical types only triggers for specific
type categories. LLVM 22 retains more type sugar from template
specializations than previous versions of LLVM, and doesn't report the
type category that activates the fallback. Functions with template-typed
parameters vanish from documentation.

The fallback comparison triggers whenever the original type
strings differ, regardless of type category. This is safe because
canonical comparison is only used as a fallback after the
candidate node, arity, and other matching constraints have already
been narrowed. Bare template type parameters are excluded from
canonicalization to preserve distinct Q_QDOC parameter names that
would otherwise collapse to synthetic type-parameter-N-M
identifiers. Wrapped forms such as const T &, T *, and
Container<T> are safe under canonical fallback because both sides
of the comparison canonicalize symmetrically.

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