Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: tools/clang/plugins/tests/missing_ctor_dllexport.h

Issue 1385193002: Bisect clang Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 246985 Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef MISSING_CTOR_H_
6 #define MISSING_CTOR_H_
7
8 struct MyString {
9 MyString();
10 MyString(const MyString&);
11 MyString(MyString&&);
12 };
13
14 template <class T>
15 struct MyVector {
16 MyVector();
17 MyVector(const MyVector&);
18 MyVector(MyVector&&);
19 };
20
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:
25
26 private:
27 MyVector<int> one_;
28 MyVector<MyString> two_;
29 };
30
31 class __declspec(dllexport) InlineImplicitMoveCtorOK {
32 public:
33 InlineImplicitMoveCtorOK();
34
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_;
43 };
44
45 class __declspec(dllexport) ExplicitlyDefaultedInlineAlsoWarns {
46 public:
47 ExplicitlyDefaultedInlineAlsoWarns() = default;
48 ~ExplicitlyDefaultedInlineAlsoWarns() = default;
49 ExplicitlyDefaultedInlineAlsoWarns(
50 const ExplicitlyDefaultedInlineAlsoWarns&) = default;
51 ExplicitlyDefaultedInlineAlsoWarns(ExplicitlyDefaultedInlineAlsoWarns&&) =
52 default;
53
54 private:
55 MyVector<int> one_;
56 MyVector<MyString> two_;
57
58 };
59
60 #endif // MISSING_CTOR_H_
OLDNEW
« no previous file with comments | « tools/clang/plugins/tests/missing_ctor.txt ('k') | tools/clang/plugins/tests/missing_ctor_dllexport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698