[NaCl SDK] nacl_io: Fix bad test added in def60c00.
[chromium-blink-merge.git] / tools / clang / plugins / tests / missing_ctor.h
blob0551fd739473d6f0503185efd665d5bbeeecbbea
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 #include <string>
9 #include <vector>
11 // Note: this should warn for an implicit copy constructor too, but currently
12 // doesn't, due to a plugin bug.
13 class MissingCtorsArentOKInHeader {
14 public:
16 private:
17 std::vector<int> one_;
18 std::vector<std::string> two_;
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();
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_;
37 class ExplicitlyDefaultedInlineAlsoWarns {
38 public:
39 ExplicitlyDefaultedInlineAlsoWarns() = default;
40 ~ExplicitlyDefaultedInlineAlsoWarns() = default;
41 ExplicitlyDefaultedInlineAlsoWarns(
42 const ExplicitlyDefaultedInlineAlsoWarns&) = default;
44 private:
45 std::vector<int> one_;
46 std::vector<std::string> two_;
50 #endif // MISSING_CTOR_H_