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

Side by Side Diff: tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded_error.h

Issue 2655933002: blink_gc_plugin: retire overloaded traceImpl detection and handling. (Closed)
Patch Set: Created 3 years, 10 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_OVERLOADED_ERROR_H_ 5 #ifndef TRACEIMPL_OVERLOADED_ERROR_H_
6 #define TRACEIMPL_OVERLOADED_ERROR_H_ 6 #define TRACEIMPL_OVERLOADED_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 void trace(Visitor*) {} 14 void trace(Visitor*) {}
15 void trace(InlinedGlobalMarkingVisitor) {}
16 }; 15 };
17 16
18 class InlinedBase : public GarbageCollected<InlinedBase> { 17 class InlinedBase : public GarbageCollected<InlinedBase> {
19 public: 18 public:
20 virtual void trace(Visitor* visitor) { traceImpl(visitor); } 19 virtual void trace(Visitor* visitor) {
21 virtual void trace(InlinedGlobalMarkingVisitor visitor) {
22 traceImpl(visitor);
23 }
24
25 private:
26 template <typename VisitorDispatcher>
27 void traceImpl(VisitorDispatcher visitor) {
28 // Missing visitor->trace(x_base_). 20 // Missing visitor->trace(x_base_).
29 } 21 }
30 22
31 Member<X> x_base_; 23 Member<X> x_base_;
32 }; 24 };
33 25
34 class InlinedDerived : public InlinedBase { 26 class InlinedDerived : public InlinedBase {
35 public: 27 public:
36 void trace(Visitor* visitor) override { traceImpl(visitor); } 28 void trace(Visitor* visitor) override {
37 void trace(InlinedGlobalMarkingVisitor visitor) override {
38 traceImpl(visitor);
39 }
40
41 private:
42 template <typename VisitorDispatcher>
43 void traceImpl(VisitorDispatcher visitor) {
44 // Missing visitor->trace(x_derived_) and InlinedBase::trace(visitor). 29 // Missing visitor->trace(x_derived_) and InlinedBase::trace(visitor).
45 } 30 }
46 31
47 Member<X> x_derived_; 32 Member<X> x_derived_;
48 }; 33 };
49 34
50 class ExternBase : public GarbageCollected<ExternBase> { 35 class ExternBase : public GarbageCollected<ExternBase> {
51 public: 36 public:
52 virtual void trace(Visitor*); 37 virtual void trace(Visitor*);
53 virtual void trace(InlinedGlobalMarkingVisitor);
54 38
55 private: 39 private:
56 template <typename VisitorDispatcher>
57 void traceImpl(VisitorDispatcher);
58
59 Member<X> x_base_; 40 Member<X> x_base_;
60 }; 41 };
61 42
62 class ExternDerived : public ExternBase { 43 class ExternDerived : public ExternBase {
63 public: 44 public:
64 void trace(Visitor*) override; 45 void trace(Visitor*) override;
65 void trace(InlinedGlobalMarkingVisitor) override;
66 46
67 private: 47 private:
68 template <typename VisitorDispatcher>
69 void traceImpl(VisitorDispatcher);
70
71 Member<X> x_derived_; 48 Member<X> x_derived_;
72 }; 49 };
73 50
74 } 51 }
75 52
76 #endif // TRACEIMPL_OVERLOADED_ERROR_H_ 53 #endif // TRACEIMPL_OVERLOADED_ERROR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698