summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/modernize-use-using.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/modernize-use-using.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/modernize-use-using.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-using.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-using.cpp
index e8f4958f951..efa4030d001 100644
--- a/clang-tools-extra/test/clang-tidy/modernize-use-using.cpp
+++ b/clang-tools-extra/test/clang-tidy/modernize-use-using.cpp
@@ -162,3 +162,24 @@ typedef unsigned Map[lol];
typedef void (*fun_type)();
// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
// CHECK-FIXES: using fun_type = void (*)();
+
+namespace template_instantiations {
+template <typename T>
+class C {
+ protected:
+ typedef C<T> super;
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
+ // CHECK-FIXES: using super = C<T>;
+ virtual void f();
+
+public:
+ virtual ~C();
+};
+
+class D : public C<D> {
+ void f() override { super::f(); }
+};
+class E : public C<E> {
+ void f() override { super::f(); }
+};
+}
OpenPOWER on IntegriCloud