1// RUN: %check_clang_tidy -std=c++17-or-later %s misc-unused-using-decls %t -- --fix-notes -- -fno-delayed-template-parsing
2
3namespace ns {
4
5template <typename T> class Foo {
6public:
7 Foo(T);
8};
9// Deduction guide (CTAD)
10template <typename T> Foo(T t) -> Foo<T>;
11
12template <typename T> class Bar {
13public:
14 Bar(T);
15};
16
17template <typename T> class Unused {};
18
19} // namespace ns
20
21using ns::Bar;
22using ns::Foo;
23using ns::Unused; // Unused
24// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: using decl 'Unused' is unused
25// CHECK-FIXES: {{^}}// Unused
26
27void f() {
28 Foo(123);
29 Bar(1);
30}
31

source code of clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls-cxx17.cpp