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

Side by Side Diff: tools/clang/plugins/tests/base_refcounted.txt

Issue 10407057: Optionally check base classes for refcounting issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
« no previous file with comments | « tools/clang/plugins/tests/base_refcounted.flags ('k') | tools/clang/plugins/tests/test.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 In file included from base_refcounted.cpp:5: 1 In file included from base_refcounted.cpp:5:
2 ./base_refcounted.h:45:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors. 2 ./base_refcounted.h:47:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors.
3 ~PublicRefCountedDtorInHeader() {} 3 ~PublicRefCountedDtorInHeader() {}
4 ^ 4 ^
5 ./base_refcounted.h:57:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors. 5 ./base_refcounted.h:44:7: note: [chromium-style] 'PublicRefCountedDtorInHeader' inherits from 'base::RefCounted<PublicRefCountedDtorInHeader>' here
6 : public base::RefCounted<PublicRefCountedDtorInHeader> {
7 ^
8 ./base_refcounted.h:59:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors.
6 ~PublicRefCountedThreadSafeDtorInHeader() {} 9 ~PublicRefCountedThreadSafeDtorInHeader() {}
7 ^ 10 ^
8 ./base_refcounted.h:94:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors. 11 ./base_refcounted.h:55:7: note: [chromium-style] 'PublicRefCountedThreadSafeDtor InHeader' inherits from 'base::RefCountedThreadSafe<PublicRefCountedThreadSafeDt orInHeader>' here
12 : public base::RefCountedThreadSafe<
13 ^
14 ./base_refcounted.h:96:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors.
9 ~DerivedProtectedToPublicInHeader() {} 15 ~DerivedProtectedToPublicInHeader() {}
10 ^ 16 ^
11 ./base_refcounted.h:99:1: warning: [chromium-style] Classes that are ref-counted should have explicit destructors that are protected or private. 17 ./base_refcounted.h:93:7: note: [chromium-style] 'DerivedProtectedToPublicInHead er' inherits from 'ProtectedRefCountedDtorInHeader' here
18 : public ProtectedRefCountedDtorInHeader {
19 ^
20 ./base_refcounted.h:68:7: note: [chromium-style] 'ProtectedRefCountedDtorInHeade r' inherits from 'base::RefCounted<ProtectedRefCountedDtorInHeader>' here
21 : public base::RefCounted<ProtectedRefCountedDtorInHeader> {
22 ^
23 ./base_refcounted.h:101:7: warning: [chromium-style] Classes that are ref-counte d should have explicit destructors that are declared protected or private.
12 class ImplicitDerivedProtectedToPublicInHeader 24 class ImplicitDerivedProtectedToPublicInHeader
25 ^
26 ./base_refcounted.h:102:7: note: [chromium-style] 'ImplicitDerivedProtectedToPub licInHeader' inherits from 'ProtectedRefCountedDtorInHeader' here
27 : public ProtectedRefCountedDtorInHeader {
28 ^
29 ./base_refcounted.h:68:7: note: [chromium-style] 'ProtectedRefCountedDtorInHeade r' inherits from 'base::RefCounted<ProtectedRefCountedDtorInHeader>' here
30 : public base::RefCounted<ProtectedRefCountedDtorInHeader> {
31 ^
32 ./base_refcounted.h:131:1: warning: [chromium-style] Classes that are ref-counte d should not have public destructors.
33 class ImplementsAPublicInterface
13 ^ 34 ^
35 ./base_refcounted.h:133:7: note: [chromium-style] 'ImplementsAPublicInterface' i nherits from 'base::RefCounted<ImplementsAPublicInterface>' here
36 public base::RefCounted<ImplementsAPublicInterface> {
37 ^
38 ./base_refcounted.h:125:3: note: [chromium-style] Public destructor declared her e
39 virtual ~APublicInterface() {}
40 ^
41 ./base_refcounted.h:132:7: note: [chromium-style] 'ImplementsAPublicInterface' i nherits from 'APublicInterface' here
42 : public APublicInterface,
43 ^
44 ./base_refcounted.h:150:1: warning: [chromium-style] Classes that are ref-counte d should have explicit destructors that are declared protected or private.
45 class ImplementsAnImplicitInterface
46 ^
47 ./base_refcounted.h:152:7: note: [chromium-style] 'ImplementsAnImplicitInterface ' inherits from 'base::RefCounted<ImplementsAnImplicitInterface>' here
48 public base::RefCounted<ImplementsAnImplicitInterface> {
49 ^
50 ./base_refcounted.h:144:7: note: [chromium-style] No explicit destructor for 'An ImplicitInterface' defined
51 class AnImplicitInterface {
52 ^
53 ./base_refcounted.h:151:7: note: [chromium-style] 'ImplementsAnImplicitInterface ' inherits from 'AnImplicitInterface' here
54 : public AnImplicitInterface,
55 ^
56 ./base_refcounted.h:194:1: warning: [chromium-style] Classes that are ref-counte d should not have public destructors.
57 class UnsafeInheritanceChain
58 ^
59 ./base_refcounted.h:197:7: note: [chromium-style] 'UnsafeInheritanceChain' inher its from 'RefcountedType' here
60 public RefcountedType {
61 ^
62 ./base_refcounted.h:188:24: note: [chromium-style] 'RefcountedType' inherits fro m 'base::RefCounted<RefcountedType>' here
63 class RefcountedType : public base::RefCounted<RefcountedType> {
64 ^
65 ./base_refcounted.h:176:3: note: [chromium-style] Public destructor declared her e
66 virtual ~BaseInterface() {}
67 ^
68 ./base_refcounted.h:195:7: note: [chromium-style] 'UnsafeInheritanceChain' inher its from 'DerivedInterface' here
69 : public DerivedInterface,
70 ^
71 ./base_refcounted.h:179:26: note: [chromium-style] 'DerivedInterface' inherits f rom 'BaseInterface' here
72 class DerivedInterface : public BaseInterface {
73 ^
74 ./base_refcounted.h:194:1: warning: [chromium-style] Classes that are ref-counte d should not have public destructors.
75 class UnsafeInheritanceChain
76 ^
77 ./base_refcounted.h:197:7: note: [chromium-style] 'UnsafeInheritanceChain' inher its from 'RefcountedType' here
78 public RefcountedType {
79 ^
80 ./base_refcounted.h:188:24: note: [chromium-style] 'RefcountedType' inherits fro m 'base::RefCounted<RefcountedType>' here
81 class RefcountedType : public base::RefCounted<RefcountedType> {
82 ^
83 ./base_refcounted.h:185:3: note: [chromium-style] Public destructor declared her e
84 virtual ~SomeOtherInterface() {}
85 ^
86 ./base_refcounted.h:196:7: note: [chromium-style] 'UnsafeInheritanceChain' inher its from 'SomeOtherInterface' here
87 public SomeOtherInterface,
88 ^
14 base_refcounted.cpp:16:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors. 89 base_refcounted.cpp:16:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors.
15 ~AnonymousDerivedProtectedToPublicInImpl() {} 90 ~AnonymousDerivedProtectedToPublicInImpl() {}
16 ^ 91 ^
92 base_refcounted.cpp:13:7: note: [chromium-style] 'AnonymousDerivedProtectedToPub licInImpl' inherits from 'ProtectedRefCountedDtorInHeader' here
93 : public ProtectedRefCountedDtorInHeader {
94 ^
95 ./base_refcounted.h:68:7: note: [chromium-style] 'ProtectedRefCountedDtorInHeade r' inherits from 'base::RefCounted<ProtectedRefCountedDtorInHeader>' here
96 : public base::RefCounted<ProtectedRefCountedDtorInHeader> {
97 ^
17 base_refcounted.cpp:26:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors. 98 base_refcounted.cpp:26:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors.
18 ~PublicRefCountedDtorInImpl() {} 99 ~PublicRefCountedDtorInImpl() {}
19 ^ 100 ^
101 base_refcounted.cpp:23:7: note: [chromium-style] 'PublicRefCountedDtorInImpl' in herits from 'base::RefCounted<PublicRefCountedDtorInImpl>' here
102 : public base::RefCounted<PublicRefCountedDtorInImpl> {
103 ^
20 base_refcounted.cpp:52:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors. 104 base_refcounted.cpp:52:3: warning: [chromium-style] Classes that are ref-counted should not have public destructors.
21 ~UnsafeTypedefChainInImpl() {} 105 ~UnsafeTypedefChainInImpl() {}
22 ^ 106 ^
23 7 warnings generated. 107 base_refcounted.cpp:49:34: note: [chromium-style] 'UnsafeTypedefChainInImpl' inh erits from 'Baz::MyLocalTypedef' (aka 'RefCounted<Foo::BarInterface>') here
108 class UnsafeTypedefChainInImpl : public Baz::MyLocalTypedef {
109 ^
110 11 warnings generated.
OLDNEW
« no previous file with comments | « tools/clang/plugins/tests/base_refcounted.flags ('k') | tools/clang/plugins/tests/test.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698