[clang] Fix a UsingTemplate regression after 3e78fa860235431323aaf08c8fa922d75a7cfffa
authorHaojian Wu <hokein.wu@gmail.com>
Thu, 16 Mar 2023 08:42:41 +0000 (09:42 +0100)
committerHaojian Wu <hokein.wu@gmail.com>
Thu, 16 Mar 2023 11:59:26 +0000 (12:59 +0100)
commit1f5fdc22a26c46a11ce406b745291b3c03bc67e8
tree007acdd89953a994cfa5d750189a254f91eb9025
parente4b352a0b9a557db5998838bf43dd36f2742ada5
[clang] Fix a UsingTemplate regression after 3e78fa860235431323aaf08c8fa922d75a7cfffa

TemplateName::getAsTemplateDecl() returns the underlying TemplateDecl
for a UsingTemplate kind template name. We should respect that in the
Profile method otherwise we might desugar the template name unexpectedly
(e.g. for template argument deduction with deduciton guides).

Differential Revision: https://reviews.llvm.org/D146202
clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
clang/lib/AST/TemplateName.cpp
clang/test/AST/ast-dump-using-template.cpp