clang/win plugin: Do not warn on dllexport inline move constructors.
[chromium-blink-merge.git] / tools / clang / plugins / tests / missing_ctor_dllexport.h
blob8363fe88064c6cbb2736b91bffb2b0c724a9dca0
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MISSING_CTOR_H_
6 #define MISSING_CTOR_H_
8 struct MyString {
9 MyString();
10 MyString(const MyString&);
11 MyString(MyString&&);
14 template <class T>
15 struct MyVector {
16 MyVector();
17 MyVector(const MyVector&);
18 MyVector(MyVector&&);
21 // For now, this should only warn on the missing constructor, not on the missing
22 // copy and move constructors on dllexported classes.
23 class __declspec(dllexport) MissingCtorsArentOKInHeader {
24 public:
26 private:
27 MyVector<int> one_;
28 MyVector<MyString> two_;
31 class __declspec(dllexport) InlineImplicitMoveCtorOK {
32 public:
33 InlineImplicitMoveCtorOK();
35 private:
36 // ctor weight = 12, dtor weight = 9.
37 MyString one_;
38 MyString two_;
39 MyString three_;
40 int four_;
41 int five_;
42 int six_;
45 class __declspec(dllexport) ExplicitlyDefaultedInlineAlsoWarns {
46 public:
47 ExplicitlyDefaultedInlineAlsoWarns() = default;
48 ~ExplicitlyDefaultedInlineAlsoWarns() = default;
49 ExplicitlyDefaultedInlineAlsoWarns(
50 const ExplicitlyDefaultedInlineAlsoWarns&) = default;
51 ExplicitlyDefaultedInlineAlsoWarns(ExplicitlyDefaultedInlineAlsoWarns&&) =
52 default;
54 private:
55 MyVector<int> one_;
56 MyVector<MyString> two_;
60 #endif // MISSING_CTOR_H_