diff options
author | Daniel Jasper <djasper@google.com> | 2016-04-20 09:48:56 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2016-04-20 09:48:56 +0000 |
commit | 25e17df6638123d13232535f461c52cc7bd74c2a (patch) | |
tree | deb1845be52104e8fbb2a8729420374406006a7c /clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp | |
parent | fb5c307ccd47efe97876454e38b6bf8cd2af667b (diff) | |
download | bcm5719-llvm-25e17df6638123d13232535f461c52cc7bd74c2a.tar.gz bcm5719-llvm-25e17df6638123d13232535f461c52cc7bd74c2a.zip |
clang-tidy: [misc-unused-using-decls] Support template types.
This fixes llvm.org/PR27429.
llvm-svn: 266866
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp b/clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp index 053e65d43fd..d9f6b2174a6 100644 --- a/clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-unused-using-decls.cpp @@ -8,6 +8,8 @@ class B; class C; class D; class D { public: static int i; }; +template <typename T> class E {}; +template <typename T> class F {}; } // ----- Using declarations ----- @@ -18,11 +20,16 @@ using n::A; // A using n::B; using n::C; using n::D; +using n::E; // E +// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: using decl 'E' is unused +// CHECK-FIXES: {{^}}// E +using n::F; // ----- Usages ----- void f(B b); void g() { vector<C> data; D::i = 1; + F<int> f; } |