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

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

Issue 1141793003: Update from https://crrev.com/329939 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 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 // Note: This is not actual windows.h but the stub file in system/windows.h
8 #include <windows.h> 9 #include <windows.h>
9 10
10 // Purposely use macros to test that the FixIt hints don't try to remove the 11 // Purposely use macros to test that the FixIt hints don't try to remove the
11 // macro body. 12 // macro body.
12 #define OVERRIDE override 13 #define OVERRIDE override
13 #define FINAL final 14 #define FINAL final
14 15
15 // Base class can only use virtual. 16 // Base class can only use virtual.
16 class Base { 17 class Base {
17 public: 18 public:
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 public: 110 public:
110 virtual ~MyTest(); 111 virtual ~MyTest();
111 virtual void SetUp() override; 112 virtual void SetUp() override;
112 }; 113 };
113 114
114 class MyNotTest : public testing::NotTest { 115 class MyNotTest : public testing::NotTest {
115 public: 116 public:
116 virtual ~MyNotTest(); 117 virtual ~MyNotTest();
117 virtual void SetUp() override; 118 virtual void SetUp() override;
118 }; 119 };
120
121 class MacroBase {
122 public:
123 virtual void AddRef() = 0;
124 virtual void Virtual() {}
125 };
126
127 class Sub : public MacroBase {
128 // Shouldn't warn.
129 END_COM_MAP()
130 SYSTEM_REDUNDANT1;
131 SYSTEM_REDUNDANT2;
132 };
OLDNEW
« no previous file with comments | « tools/clang/plugins/tests/virtual_bodies.txt ('k') | tools/clang/plugins/tests/virtual_specifiers.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698