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

Side by Side Diff: tools/clang/blink_gc_plugin/tests/traceimpl_error.h

Issue 935253002: BlinkGCPlugin: Fix base class trace call detection in traceImpl(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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_ERROR_H_ 5 #ifndef TRACEIMPL_ERROR_H_
6 #define TRACEIMPL_ERROR_H_ 6 #define TRACEIMPL_ERROR_H_
7 7
8 #include "heap/stubs.h" 8 #include "heap/stubs.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 10 matching lines...) Expand all
21 21
22 template <typename VisitorDispatcher> 22 template <typename VisitorDispatcher>
23 void traceImpl(VisitorDispatcher visitor) { 23 void traceImpl(VisitorDispatcher visitor) {
24 // Empty; should get complaints from the plugin for untraced x_. 24 // Empty; should get complaints from the plugin for untraced x_.
25 } 25 }
26 26
27 private: 27 private:
28 Member<X> x_; 28 Member<X> x_;
29 }; 29 };
30 30
31
32 class TraceImplExternWithUntracedMember 31 class TraceImplExternWithUntracedMember
33 : public GarbageCollected<TraceImplExternWithUntracedMember> { 32 : public GarbageCollected<TraceImplExternWithUntracedMember> {
34 public: 33 public:
35 void trace(Visitor* visitor); 34 void trace(Visitor* visitor);
36 35
37 template <typename VisitorDispatcher> 36 template <typename VisitorDispatcher>
38 inline void traceImpl(VisitorDispatcher); 37 inline void traceImpl(VisitorDispatcher);
39 38
40 private: 39 private:
41 Member<X> x_; 40 Member<X> x_;
42 }; 41 };
43 42
43 class Base : public GarbageCollected<Base> {
44 public:
45 virtual void trace(Visitor*) {}
46 };
47
48 class TraceImplInlineWithUntracedBase : public Base {
49 public:
50 void trace(Visitor* visitor) override { traceImpl(visitor); }
51
52 template <typename VisitorDispatcher>
53 void traceImpl(VisitorDispatcher visitor) {
54 // Empty; should get complaints from the plugin for untraced Base.
55 }
56 };
57
58 class TraceImplExternWithUntracedBase : public Base {
59 public:
60 void trace(Visitor*) override;
61
62 template <typename VisitorDispatcher>
63 void traceImpl(VisitorDispatcher visitor);
64 };
65
44 } 66 }
45 67
46 #endif // TRACEIMPL_ERROR_H_ 68 #endif // TRACEIMPL_ERROR_H_
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/tests/traceimpl.cpp ('k') | tools/clang/blink_gc_plugin/tests/traceimpl_error.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698