Index: tools/clang/blink_gc_plugin/tests/non_virtual_trace.h |
diff --git a/tools/clang/blink_gc_plugin/tests/pure_virtual_trace.h b/tools/clang/blink_gc_plugin/tests/non_virtual_trace.h |
similarity index 67% |
copy from tools/clang/blink_gc_plugin/tests/pure_virtual_trace.h |
copy to tools/clang/blink_gc_plugin/tests/non_virtual_trace.h |
index d0b67a3aada80b064775ab6963286e14e0a2f50e..daf50008b39ec03ff969ee8471b9a56ee6ddee25 100644 |
--- a/tools/clang/blink_gc_plugin/tests/pure_virtual_trace.h |
+++ b/tools/clang/blink_gc_plugin/tests/non_virtual_trace.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef PURE_VIRTUAL_BASE_H_ |
-#define PURE_VIRTUAL_BASE_H_ |
+#ifndef NON_VIRTUAL_TRACE_H_ |
+#define NON_VIRTUAL_TRACE_H_ |
#include "heap/stubs.h" |
@@ -11,19 +11,15 @@ namespace WebCore { |
class A : public GarbageCollected<A> { |
public: |
- virtual void trace(Visitor*) = 0; |
+ void trace(Visitor*); |
}; |
class B : public A { |
-public: |
- // Does not need a trace method. |
}; |
class C : public B { |
public: |
- void trace(Visitor*); |
-private: |
- Member<A> m_a; |
+ void trace(Visitor*); // Cannot override a non-virtual trace. |
}; |
} |