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"
12 class X
: public GarbageCollected
<X
> {
14 virtual void trace(Visitor
*) {}
17 class TraceImplInlinedWithUntracedMember
18 : public GarbageCollected
<TraceImplInlinedWithUntracedMember
> {
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_.
31 class TraceImplExternWithUntracedMember
32 : public GarbageCollected
<TraceImplExternWithUntracedMember
> {
34 void trace(Visitor
* visitor
);
36 template <typename VisitorDispatcher
>
37 inline void traceImpl(VisitorDispatcher
);
43 class Base
: public GarbageCollected
<Base
> {
45 virtual void trace(Visitor
*) {}
48 class TraceImplInlineWithUntracedBase
: public Base
{
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
{
60 void trace(Visitor
*) override
;
62 template <typename VisitorDispatcher
>
63 void traceImpl(VisitorDispatcher visitor
);
68 #endif // TRACEIMPL_ERROR_H_