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

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

Issue 2483973003: Treat std::atomic_int as a trivial class member when checking for non-trivial classes. (Closed)
Patch Set: Add a test, and fix a typo. Created 4 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
« no previous file with comments | « tools/clang/plugins/tests/trivial_ctor.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 VIRTUAL_METHODS_H_ 5 #ifndef VIRTUAL_BODIES_H_
6 #define VIRTUAL_METHODS_H_ 6 #define VIRTUAL_BODIES_H_
7 7
8 // Note: This is not actual windows.h but the stub file in system/windows.h 8 // Note: This is not actual windows.h but the stub file in system/windows.h
9 #include <windows.h> 9 #include <windows.h>
10 10
11 #define CR_BEGIN_MSG_MAP_EX(theClass) virtual int f() { return 4; } 11 #define CR_BEGIN_MSG_MAP_EX(theClass) virtual int f() { return 4; }
12 #define BEGIN_SAFE_MSG_MAP_EX(theClass) virtual int g() { return 4; } 12 #define BEGIN_SAFE_MSG_MAP_EX(theClass) virtual int g() { return 4; }
13 13
14 // Should warn about virtual method usage. 14 // Should warn about virtual method usage.
15 class VirtualMethodsInHeaders { 15 class VirtualMethodsInHeaders {
16 public: 16 public:
(...skipping 23 matching lines...) Expand all
40 40
41 class VirtualMethodsInHeadersTesting : public VirtualMethodsInHeaders { 41 class VirtualMethodsInHeadersTesting : public VirtualMethodsInHeaders {
42 public: 42 public:
43 // Don't complain about no virtual testing methods. 43 // Don't complain about no virtual testing methods.
44 void MethodHasNoArguments(); 44 void MethodHasNoArguments();
45 45
46 private: 46 private:
47 testing::TestStruct tester_; 47 testing::TestStruct tester_;
48 }; 48 };
49 49
50 #endif // VIRTUAL_METHODS_H_ 50 #endif // VIRTUAL_BODIES_H_
OLDNEW
« no previous file with comments | « tools/clang/plugins/tests/trivial_ctor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698