| 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 1050457a1a2e4d2533b7b33858dfd8789701c8d5..0551fd739473d6f0503185efd665d5bbeeecbbea 100644
|
| --- a/tools/clang/plugins/tests/missing_ctor.h
|
| +++ b/tools/clang/plugins/tests/missing_ctor.h
|
| @@ -8,6 +8,8 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +// Note: this should warn for an implicit copy constructor too, but currently
|
| +// doesn't, due to a plugin bug.
|
| class MissingCtorsArentOKInHeader {
|
| public:
|
|
|
| @@ -16,4 +18,33 @@ class MissingCtorsArentOKInHeader {
|
| std::vector<std::string> two_;
|
| };
|
|
|
| +// Inline move ctors shouldn't be warned about. Similar to the previous test
|
| +// case, this also incorrectly fails to warn for the implicit copy ctor.
|
| +class InlineImplicitMoveCtorOK {
|
| + public:
|
| + InlineImplicitMoveCtorOK();
|
| +
|
| + private:
|
| + // ctor weight = 12, dtor weight = 9.
|
| + std::string one_;
|
| + std::string two_;
|
| + std::string three_;
|
| + int four_;
|
| + int five_;
|
| + int six_;
|
| +};
|
| +
|
| +class ExplicitlyDefaultedInlineAlsoWarns {
|
| + public:
|
| + ExplicitlyDefaultedInlineAlsoWarns() = default;
|
| + ~ExplicitlyDefaultedInlineAlsoWarns() = default;
|
| + ExplicitlyDefaultedInlineAlsoWarns(
|
| + const ExplicitlyDefaultedInlineAlsoWarns&) = default;
|
| +
|
| + private:
|
| + std::vector<int> one_;
|
| + std::vector<std::string> two_;
|
| +
|
| +};
|
| +
|
| #endif // MISSING_CTOR_H_
|
|
|