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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MISSING_CTOR_H_ 5 #ifndef MISSING_CTOR_H_
6 #define MISSING_CTOR_H_ 6 #define MISSING_CTOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 // Note: this should warn for an implicit copy constructor too, but currently
12 // doesn't, due to a plugin bug.
13 class MissingCtorsArentOKInHeader { 11 class MissingCtorsArentOKInHeader {
14 public: 12 public:
15 13
16 private: 14 private:
17 std::vector<int> one_; 15 std::vector<int> one_;
18 std::vector<std::string> two_; 16 std::vector<std::string> two_;
19 }; 17 };
20 18
21 // Inline move ctors shouldn't be warned about. Similar to the previous test
22 // case, this also incorrectly fails to warn for the implicit copy ctor.
23 class InlineImplicitMoveCtorOK {
24 public:
25 InlineImplicitMoveCtorOK();
26
27 private:
28 // ctor weight = 12, dtor weight = 9.
29 std::string one_;
30 std::string two_;
31 std::string three_;
32 int four_;
33 int five_;
34 int six_;
35 };
36
37 class ExplicitlyDefaultedInlineAlsoWarns {
38 public:
39 ExplicitlyDefaultedInlineAlsoWarns() = default;
40 ~ExplicitlyDefaultedInlineAlsoWarns() = default;
41 ExplicitlyDefaultedInlineAlsoWarns(
42 const ExplicitlyDefaultedInlineAlsoWarns&) = default;
43
44 private:
45 std::vector<int> one_;
46 std::vector<std::string> two_;
47
48 };
49
50 #endif // MISSING_CTOR_H_ 19 #endif // MISSING_CTOR_H_
OLDNEW
« no previous file with comments | « tools/clang/plugins/tests/base_refcounted.txt ('k') | tools/clang/plugins/tests/missing_ctor.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698