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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/tests/missing_ctor_dllexport.h
diff --git a/tools/clang/plugins/tests/missing_ctor_dllexport.h b/tools/clang/plugins/tests/missing_ctor_dllexport.h
new file mode 100644
index 0000000000000000000000000000000000000000..8363fe88064c6cbb2736b91bffb2b0c724a9dca0
--- /dev/null
+++ b/tools/clang/plugins/tests/missing_ctor_dllexport.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MISSING_CTOR_H_
+#define MISSING_CTOR_H_
+
+struct MyString {
+ MyString();
+ MyString(const MyString&);
+ MyString(MyString&&);
+};
+
+template <class T>
+struct MyVector {
+ MyVector();
+ MyVector(const MyVector&);
+ MyVector(MyVector&&);
+};
+
+// For now, this should only warn on the missing constructor, not on the missing
+// copy and move constructors on dllexported classes.
+class __declspec(dllexport) MissingCtorsArentOKInHeader {
+ public:
+
+ private:
+ MyVector<int> one_;
+ MyVector<MyString> two_;
+};
+
+class __declspec(dllexport) InlineImplicitMoveCtorOK {
+ public:
+ InlineImplicitMoveCtorOK();
+
+ private:
+ // ctor weight = 12, dtor weight = 9.
+ MyString one_;
+ MyString two_;
+ MyString three_;
+ int four_;
+ int five_;
+ int six_;
+};
+
+class __declspec(dllexport) ExplicitlyDefaultedInlineAlsoWarns {
+ public:
+ ExplicitlyDefaultedInlineAlsoWarns() = default;
+ ~ExplicitlyDefaultedInlineAlsoWarns() = default;
+ ExplicitlyDefaultedInlineAlsoWarns(
+ const ExplicitlyDefaultedInlineAlsoWarns&) = default;
+ ExplicitlyDefaultedInlineAlsoWarns(ExplicitlyDefaultedInlineAlsoWarns&&) =
+ default;
+
+ private:
+ MyVector<int> one_;
+ MyVector<MyString> two_;
+
+};
+
+#endif // MISSING_CTOR_H_
« 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