Index: tools/clang/plugins/tests/missing_ctor.h |
diff --git a/tools/clang/plugins/tests/missing_ctor.h b/tools/clang/plugins/tests/missing_ctor.h |
index 0551fd739473d6f0503185efd665d5bbeeecbbea..2587a10d9e75dd80b018d4ef771ca4ca4c82a92e 100644 |
--- a/tools/clang/plugins/tests/missing_ctor.h |
+++ b/tools/clang/plugins/tests/missing_ctor.h |
@@ -5,8 +5,20 @@ |
#ifndef MISSING_CTOR_H_ |
#define MISSING_CTOR_H_ |
-#include <string> |
-#include <vector> |
+struct MyString { |
+ MyString(); |
+ ~MyString(); |
+ MyString(const MyString&); |
+ MyString(MyString&&); |
+}; |
+ |
+template <class T> |
+struct MyVector { |
+ MyVector(); |
+ ~MyVector(); |
+ MyVector(const MyVector&); |
+ MyVector(MyVector&&); |
+}; |
// Note: this should warn for an implicit copy constructor too, but currently |
// doesn't, due to a plugin bug. |
@@ -14,8 +26,8 @@ class MissingCtorsArentOKInHeader { |
public: |
private: |
- std::vector<int> one_; |
- std::vector<std::string> two_; |
+ MyVector<int> one_; |
+ MyVector<MyString> two_; |
}; |
// Inline move ctors shouldn't be warned about. Similar to the previous test |
@@ -26,9 +38,9 @@ class InlineImplicitMoveCtorOK { |
private: |
// ctor weight = 12, dtor weight = 9. |
- std::string one_; |
- std::string two_; |
- std::string three_; |
+ MyString one_; |
+ MyString two_; |
+ MyString three_; |
int four_; |
int five_; |
int six_; |
@@ -42,8 +54,8 @@ class ExplicitlyDefaultedInlineAlsoWarns { |
const ExplicitlyDefaultedInlineAlsoWarns&) = default; |
private: |
- std::vector<int> one_; |
- std::vector<std::string> two_; |
+ MyVector<int> one_; |
+ MyVector<MyString> two_; |
}; |