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

Side by Side Diff: tools/clang/plugins/tests/virtual_specifiers.cpp

Issue 670183003: Update from chromium 62675d9fb31fb8cedc40f68e78e8445a74f362e7 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // Tests for chromium style checks for virtual/override/final specifiers on 5 // Tests for chromium style checks for virtual/override/final specifiers on
6 // virtual methods. 6 // virtual methods.
7 7
8 // Purposely use macros to test that the FixIt hints don't try to remove the 8 // Purposely use macros to test that the FixIt hints don't try to remove the
9 // macro body. 9 // macro body.
10 #define OVERRIDE override 10 #define OVERRIDE override
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 public: 54 public:
55 virtual ~VirtualAndOverrideFinal() OVERRIDE FINAL {} 55 virtual ~VirtualAndOverrideFinal() OVERRIDE FINAL {}
56 virtual void F() OVERRIDE FINAL {} 56 virtual void F() OVERRIDE FINAL {}
57 }; 57 };
58 58
59 class OverrideAndFinal : public Base { 59 class OverrideAndFinal : public Base {
60 public: 60 public:
61 ~OverrideAndFinal() OVERRIDE FINAL {} 61 ~OverrideAndFinal() OVERRIDE FINAL {}
62 void F() OVERRIDE FINAL {} 62 void F() OVERRIDE FINAL {}
63 }; 63 };
64
65 // Finally, some simple sanity tests that overrides in the testing namespace
66 // don't trigger warnings, except for testing::Test.
67 namespace testing {
68
69 class Test {
70 public:
71 virtual ~Test();
72 virtual void SetUp();
73 };
74
75 class NotTest {
76 public:
77 virtual ~NotTest();
78 virtual void SetUp();
79 };
80
81 } // namespace
82
83 class MyTest : public testing::Test {
84 public:
85 virtual ~MyTest();
86 virtual void SetUp() override;
87 };
88
89 class MyNotTest : public testing::NotTest {
90 public:
91 virtual ~MyNotTest();
92 virtual void SetUp() override;
93 };
OLDNEW
« no previous file with comments | « tools/clang/plugins/FindBadConstructsConsumer.cpp ('k') | tools/clang/plugins/tests/virtual_specifiers.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698