Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / tools / clang / blink_gc_plugin / tests / traceimpl_error.h
blob5a883b4e56261467156cab1c1520e224eb9d5398
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_ERROR_H_
6 #define TRACEIMPL_ERROR_H_
8 #include "heap/stubs.h"
10 namespace blink {
12 class X : public GarbageCollected<X> {
13 public:
14 virtual void trace(Visitor*) {}
17 class TraceImplInlinedWithUntracedMember
18 : public GarbageCollected<TraceImplInlinedWithUntracedMember> {
19 public:
20 void trace(Visitor* visitor) { traceImpl(visitor); }
22 template <typename VisitorDispatcher>
23 void traceImpl(VisitorDispatcher visitor) {
24 // Empty; should get complaints from the plugin for untraced x_.
27 private:
28 Member<X> x_;
31 class TraceImplExternWithUntracedMember
32 : public GarbageCollected<TraceImplExternWithUntracedMember> {
33 public:
34 void trace(Visitor* visitor);
36 template <typename VisitorDispatcher>
37 inline void traceImpl(VisitorDispatcher);
39 private:
40 Member<X> x_;
43 class Base : public GarbageCollected<Base> {
44 public:
45 virtual void trace(Visitor*) {}
48 class TraceImplInlineWithUntracedBase : public Base {
49 public:
50 void trace(Visitor* visitor) override { traceImpl(visitor); }
52 template <typename VisitorDispatcher>
53 void traceImpl(VisitorDispatcher visitor) {
54 // Empty; should get complaints from the plugin for untraced Base.
58 class TraceImplExternWithUntracedBase : public Base {
59 public:
60 void trace(Visitor*) override;
62 template <typename VisitorDispatcher>
63 void traceImpl(VisitorDispatcher visitor);
68 #endif // TRACEIMPL_ERROR_H_