You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QDoc: Adapt clang/AST/QualTypeNames.h to breaking change
For compatibility reasons, QDoc carries a custom implementation of
`llvm-project.git/clang/lib/AST/QualTypeNames.cpp`. When QDoc is built
against Clang libraries from LLVM 21, QDoc fails to compile with five
separate errors:
- no matching member function for call to
'getTemplateSpecializationType'
note: candidate function not viable: requires at most 3 arguments,
but 4 were provided
- enumeration value 'TypeSpecWithTemplate' not handled in switch
- no matching function for call to 'Create'
note: candidate function not viable: no known conversion from 'const
Type *' to 'const IdentifierInfo *'/'const NamespaceDecl *'/
'const NamespaceAliasDecl *' for 3rd argument
- no member named 'getQualifier' in 'clang::MemberPointerType
The issues relate to several changes upstream, notably commit
14f7bd63b95d0f61a6f47119ac66398ca230559a (see [0]).
This change addresses the issues by adapting QDoc's custom
implementation. The required changes are wrapped in preprocessor
conditionals to ensure correct behavior with LLVM versions prior to 21
as well as 21 and above. Consequentially, the change also adds 21.1 as a
supported Clang version for QDoc.
There is one case of output regression; the index file entry for
`QMediaMetaData::asKeyValueRange<const QHash<Key, QVariant>>` from
qtmultimedia.git and its signature in a list generated in qtdoc.git now
partly desugars `Key` by adding template argument qualification.
However, as this specific function is documented with an fn-command that
overrides the declared return type using `auto`, this is considered
acceptable and a matter to be addressed elsewhere.
[0] - llvm/llvm-project#132401
Fixes: QTBUG-139407
Pick-to: 6.9 6.8
Change-Id: I2b1f88be27998eed6c03c9ebb068e21c6e9e3a17
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: Paul Wicking <[email protected]>
(cherry picked from commit 4abaf06)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
0 commit comments