From 8052f4d22a12f1baa949c7a04f029e231faae90a Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 26 Apr 2022 09:34:46 +0200 Subject: [PATCH] [AST] Consider QualifiedTemplateName in TemplateName::getAsUsingDecl(). If the underlying template name of a qualified template name is a using decl, TemplateName::getAsUsingDecl() will return it. This will make the UsingTemplateName consumer life easier. Differential Revision: https://reviews.llvm.org/D124437 --- .../clangd/unittests/IncludeCleanerTests.cpp | 8 ++++++++ clang/lib/AST/TemplateName.cpp | 2 ++ clang/unittests/AST/TemplateNameTest.cpp | 1 + 3 files changed, 11 insertions(+) diff --git a/clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp b/clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp index 8df292cd28a9..77d4e289cf26 100644 --- a/clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp +++ b/clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp @@ -90,6 +90,14 @@ TEST(IncludeCleaner, ReferencedLocations) { template