Remove linux_chromium_gn_dbg from the chromium CQ.
[chromium-blink-merge.git] / tools / clang / blink_gc_plugin / tests / traceimpl_overloaded_error.h
blob7d7a03837c6b268512f4d9e6aa2df5f85500df17
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
3 // found in the LICENSE file.
5 #ifndef TRACEIMPL_OVERLOADED_ERROR_H_
6 #define TRACEIMPL_OVERLOADED_ERROR_H_
8 #include "heap/stubs.h"
10 namespace blink {
12 class X : public GarbageCollected<X> {
13 public:
14 void trace(Visitor*) {}
15 void trace(InlinedGlobalMarkingVisitor) {}
18 class InlinedBase : public GarbageCollected<InlinedBase> {
19 public:
20 virtual void trace(Visitor* visitor) { traceImpl(visitor); }
21 virtual void trace(InlinedGlobalMarkingVisitor visitor) {
22 traceImpl(visitor);
25 private:
26 template <typename VisitorDispatcher>
27 void traceImpl(VisitorDispatcher visitor) {
28 // Missing visitor->trace(x_base_).
31 Member<X> x_base_;
34 class InlinedDerived : public InlinedBase {
35 public:
36 void trace(Visitor* visitor) override { traceImpl(visitor); }
37 void trace(InlinedGlobalMarkingVisitor visitor) override {
38 traceImpl(visitor);
41 private:
42 template <typename VisitorDispatcher>
43 void traceImpl(VisitorDispatcher visitor) {
44 // Missing visitor->trace(x_derived_) and InlinedBase::trace(visitor).
47 Member<X> x_derived_;
50 class ExternBase : public GarbageCollected<ExternBase> {
51 public:
52 virtual void trace(Visitor*);
53 virtual void trace(InlinedGlobalMarkingVisitor);
55 private:
56 template <typename VisitorDispatcher>
57 void traceImpl(VisitorDispatcher);
59 Member<X> x_base_;
62 class ExternDerived : public ExternBase {
63 public:
64 void trace(Visitor*) override;
65 void trace(InlinedGlobalMarkingVisitor) override;
67 private:
68 template <typename VisitorDispatcher>
69 void traceImpl(VisitorDispatcher);
71 Member<X> x_derived_;
76 #endif // TRACEIMPL_OVERLOADED_ERROR_H_