[all-commits] [llvm/llvm-project] d4525b: [Clang] Dispatch default overloads of `TemplateArg...

Egor Zhdan via All-commits all-commits at lists.llvm.org
Thu Nov 7 15:25:54 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4525b016f5a1ab2852acb2108742b2f9d0bd3bd
      https://github.com/llvm/llvm-project/commit/d4525b016f5a1ab2852acb2108742b2f9d0bd3bd
  Author: Egor Zhdan <e_zhdan at apple.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M clang/include/clang/AST/TemplateArgumentVisitor.h

  Log Message:
  -----------
  [Clang] Dispatch default overloads of `TemplateArgumentVisitor` to the 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`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list