summaryrefslogtreecommitdiff
path: root/clang-tools-extra/include-cleaner
diff options
context:
space:
mode:
authorHaojian Wu <hokein.wu@gmail.com>2023-01-03 15:08:42 +0100
committerHaojian Wu <hokein.wu@gmail.com>2023-01-19 14:20:38 +0100
commite70ca7b35319a3621f9d9c6475926428f8c5c000 (patch)
treebebda5ff195dd327aed59f3d24aaf5638c8f259e /clang-tools-extra/include-cleaner
parent1119c15ef5c55f2fe8a219443a9ea28f82ffe870 (diff)
downloadllvm-e70ca7b35319a3621f9d9c6475926428f8c5c000.tar.gz
[clang] Build UsingType for elaborated type specifiers.
Support building UsingType for elaborated type specifiers: ``` namespace ns { class Foo {}; } using ns::Foo; // The TypeLoc of `Foo` below should be a ElaboratedTypeLoc with an // inner UsingTypeLoc rather than the underlying `CXXRecordTypeLoc` class Foo foo; ``` Differential Revision: https://reviews.llvm.org/D141280
Diffstat (limited to 'clang-tools-extra/include-cleaner')
-rw-r--r--clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp b/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
index 3b97cc8cdfd5..e5b99ef9a3a0 100644
--- a/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
+++ b/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
@@ -150,6 +150,9 @@ TEST(WalkAST, Using) {
}
using ns::$explicit^Y;)cpp",
"^Y<int> x;");
+ testWalk(R"cpp(
+ namespace ns { class Foo {}; }
+ )cpp", "using ns::$explicit^Foo; class ^Foo foo;");
}
TEST(WalkAST, Namespaces) {