Skip to content

Conversation

bradking
Copy link
Member

Account for LLVM/Clang AST changes made by LLVM PR 147835 and LLVM PR 155347.

The low-level accessor we used previously is commented by LLVM/Clang to
suggest asking ASTContext instead.  Starting with LLVM/Clang 22, this is
mandatory for `TagDecl` types.
LLVM/Clang commit `91cdd35008e9` ([clang] Improve nested name specifier
AST representation, 2025-08-09) renamed `getDecl` to `getOriginalDecl`.
The commit message says it will be reverted before release, so we can
revert here when that happens.
LLVM/Clang 22 changed the AST's representation of elaborated tag types
in commit `91cdd35008e9` ([clang] Improve nested name specifier AST
representation, 2025-08-09).
LLVM/Clang 22 introduced a `PredefinedSugarType` in commit `7c402b8b81d2`
([Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar
types, 2025-07-19).
Since LLVM/Clang commit `91cdd35008e9` ([clang] Improve nested name
specifier AST representation, 2025-08-09) and commit `0a675f553caf`
([clang] fix uniquing of some TagTypes created from the injected class
name, 2025-08-26), Clang allocates separate `RecordType` instances for a
record decl and its injected class name.  Replace the latter with the
former, even in indirection types created from them.
CastXML now compiles and passes all tests against this version.
@bradking bradking merged commit c7fa13b into CastXML:master Aug 28, 2025
@bradking bradking deleted the llvm-git-2025-08-26 branch August 28, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant