diff --git a/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp b/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp --- a/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp +++ b/clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp @@ -196,6 +196,18 @@ "Derived foo(); void fun() { foo().^a; }"); testWalk("struct Base { int a; }; struct $explicit^Derived : public Base {};", "Derived& foo(); void fun() { foo().^a; }"); + testWalk(R"cpp( + template struct unique_ptr { + T *operator->(); + }; + struct $explicit^Foo { int a; };)cpp", + "void test(unique_ptr &V) { V->^a; }"); + testWalk(R"cpp( + template struct $explicit^unique_ptr { + void release(); + }; + struct Foo {};)cpp", + "void test(unique_ptr &V) { V.^release(); }"); } TEST(WalkAST, ConstructExprs) {