| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "base_refcounted.h" | 5 #include "base_refcounted.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| 11 // Unsafe; should error. | 11 // Unsafe; should error. |
| 12 class AnonymousDerivedProtectedToPublicInImpl | 12 class AnonymousDerivedProtectedToPublicInImpl |
| 13 : public ProtectedRefCountedVirtualDtorInHeader { | 13 : public ProtectedRefCountedVirtualDtorInHeader { |
| 14 public: | 14 public: |
| 15 AnonymousDerivedProtectedToPublicInImpl() {} | 15 AnonymousDerivedProtectedToPublicInImpl() {} |
| 16 ~AnonymousDerivedProtectedToPublicInImpl() override {} | 16 virtual ~AnonymousDerivedProtectedToPublicInImpl() {} |
| 17 }; | 17 }; |
| 18 | 18 |
| 19 // Unsafe; but we should only warn on the base class. | 19 // Unsafe; but we should only warn on the base class. |
| 20 class AnonymousDerivedProtectedOnDerived | 20 class AnonymousDerivedProtectedOnDerived |
| 21 : public ProtectedRefCountedDtorInHeader { | 21 : public ProtectedRefCountedDtorInHeader { |
| 22 protected: | 22 protected: |
| 23 ~AnonymousDerivedProtectedOnDerived() {} | 23 ~AnonymousDerivedProtectedOnDerived() {} |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 } // namespace | 26 } // namespace |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 PublicRefCountedThreadSafeDtorInHeader another_bad_variation; | 70 PublicRefCountedThreadSafeDtorInHeader another_bad_variation; |
| 71 AnonymousDerivedProtectedToPublicInImpl and_this_is_bad_too; | 71 AnonymousDerivedProtectedToPublicInImpl and_this_is_bad_too; |
| 72 ImplicitDerivedProtectedToPublicInHeader bad_yet_again; | 72 ImplicitDerivedProtectedToPublicInHeader bad_yet_again; |
| 73 UnsafeTypedefChainInImpl and_again_this_is_bad; | 73 UnsafeTypedefChainInImpl and_again_this_is_bad; |
| 74 | 74 |
| 75 WebKitPublicDtorInHeader ignored; | 75 WebKitPublicDtorInHeader ignored; |
| 76 WebKitDerivedPublicDtorInHeader still_ignored; | 76 WebKitDerivedPublicDtorInHeader still_ignored; |
| 77 | 77 |
| 78 return 0; | 78 return 0; |
| 79 } | 79 } |
| OLD | NEW |