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

Side by Side Diff: tools/clang/blink_gc_plugin/tests/traceimpl_error.h

Issue 2655933002: blink_gc_plugin: retire overloaded traceImpl detection and handling. (Closed)
Patch Set: Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 TRACEIMPL_ERROR_H_ 5 #ifndef TRACEIMPL_ERROR_H_
6 #define TRACEIMPL_ERROR_H_ 6 #define TRACEIMPL_ERROR_H_
7 7
8 #include "heap/stubs.h" 8 #include "heap/stubs.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class X : public GarbageCollected<X> { 12 class X : public GarbageCollected<X> {
13 public: 13 public:
14 virtual void Trace(Visitor*) {} 14 virtual void Trace(Visitor*) {}
15 }; 15 };
16 16
17 class TraceImplInlinedWithUntracedMember 17 class TraceImplInlinedWithUntracedMember
18 : public GarbageCollected<TraceImplInlinedWithUntracedMember> { 18 : public GarbageCollected<TraceImplInlinedWithUntracedMember> {
19 public: 19 public:
20 void Trace(Visitor* visitor) { TraceImpl(visitor); } 20 void Trace(Visitor* visitor) {
21
22 template <typename VisitorDispatcher>
23 void TraceImpl(VisitorDispatcher visitor) {
24 // Empty; should get complaints from the plugin for untraced x_. 21 // Empty; should get complaints from the plugin for untraced x_.
25 } 22 }
26 23
27 private: 24 private:
28 Member<X> x_; 25 Member<X> x_;
29 }; 26 };
30 27
31 class TraceImplExternWithUntracedMember 28 class TraceImplExternWithUntracedMember
32 : public GarbageCollected<TraceImplExternWithUntracedMember> { 29 : public GarbageCollected<TraceImplExternWithUntracedMember> {
33 public: 30 public:
34 void Trace(Visitor* visitor); 31 void Trace(Visitor* visitor);
35 32
36 template <typename VisitorDispatcher>
37 inline void TraceImpl(VisitorDispatcher);
38
39 private: 33 private:
40 Member<X> x_; 34 Member<X> x_;
41 }; 35 };
42 36
43 class Base : public GarbageCollected<Base> { 37 class Base : public GarbageCollected<Base> {
44 public: 38 public:
45 virtual void Trace(Visitor*) {} 39 virtual void Trace(Visitor*) {}
46 }; 40 };
47 41
48 class TraceImplInlineWithUntracedBase : public Base { 42 class TraceImplInlineWithUntracedBase : public Base {
49 public: 43 public:
50 void Trace(Visitor* visitor) override { TraceImpl(visitor); } 44 void Trace(Visitor* visitor) override {
51
52 template <typename VisitorDispatcher>
53 void TraceImpl(VisitorDispatcher visitor) {
54 // Empty; should get complaints from the plugin for untraced Base. 45 // Empty; should get complaints from the plugin for untraced Base.
55 } 46 }
56 }; 47 };
57 48
58 class TraceImplExternWithUntracedBase : public Base { 49 class TraceImplExternWithUntracedBase : public Base {
59 public: 50 public:
60 void Trace(Visitor*) override; 51 void Trace(Visitor*) override;
61
62 template <typename VisitorDispatcher>
63 void TraceImpl(VisitorDispatcher visitor);
64 }; 52 };
65 53
66 } 54 }
67 55
68 #endif // TRACEIMPL_ERROR_H_ 56 #endif // TRACEIMPL_ERROR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698