Skip to content

Conversation

@egorzhdan
Copy link

This fixes an issue where overriding
clang::ConstTemplateArgumentVisitor::VisitTemplateArgument in an implementation visitor class did not have the desired effect: the overload was not invoked when one of the visitor methods (e.g. VisitDeclarationArgument) is not implemented, instead it dispatched to clang::ConstTemplateArgumentVisitor::VisitTemplateArgument itself and always returned a default-initialized result.

This makes TemplateArgumentVisitor and ConstTemplateArgumentVisitor follow the implicit convention that is followed elsewhere in Clang AST, in RecursiveASTVisitor and TypeVisitor.

(cherry picked from commit d4525b0)

…e implementation

This fixes an issue where overriding
`clang::ConstTemplateArgumentVisitor::VisitTemplateArgument` in an
implementation visitor class did not have the desired effect: the
overload was not invoked when one of the visitor methods (e.g.
`VisitDeclarationArgument`) is not implemented, instead it dispatched to
`clang::ConstTemplateArgumentVisitor::VisitTemplateArgument` itself and
always returned a default-initialized result.

This makes `TemplateArgumentVisitor` and `ConstTemplateArgumentVisitor`
follow the implicit convention that is followed elsewhere in Clang AST,
in `RecursiveASTVisitor` and `TypeVisitor`.

(cherry picked from commit d4525b0)
@egorzhdan egorzhdan requested a review from Xazax-hun November 8, 2024 14:39
@egorzhdan
Copy link
Author

@swift-ci please test LLVM

@egorzhdan
Copy link
Author

@swift-ci please test

@egorzhdan egorzhdan merged commit 14e578f into stable/20240723 Nov 8, 2024
5 checks passed
@egorzhdan egorzhdan deleted the egorzhdan/20240723-class-template-packs branch November 8, 2024 20:53
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.

3 participants