media/webrtc/trunk/tools/clang/plugins/tests/inline_ctor.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/webrtc/trunk/tools/clang/plugins/tests/inline_ctor.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
     1.5 +// Use of this source code is governed by a BSD-style license that can be
     1.6 +// found in the LICENSE file.
     1.7 +
     1.8 +#include "inline_ctor.h"
     1.9 +
    1.10 +#include <string>
    1.11 +#include <vector>
    1.12 +
    1.13 +// We don't warn on classes that are in CPP files.
    1.14 +class InlineInCPPOK {
    1.15 + public:
    1.16 +  InlineInCPPOK() {}
    1.17 +  ~InlineInCPPOK() {}
    1.18 +
    1.19 + private:
    1.20 +  std::vector<int> one_;
    1.21 +  std::vector<std::string> two_;
    1.22 +};
    1.23 +
    1.24 +int main() {
    1.25 +  InlineInCPPOK one;
    1.26 +  InlineCtorsArentOKInHeader two;
    1.27 +  return 0;
    1.28 +}

mercurial