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

Unified Diff: tools/clang/plugins/tests/base_refcounted.cpp

Issue 1709343002: Remove tools/clang (this will break things temporarily). Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/plugins/tests/base_refcounted.h ('k') | tools/clang/plugins/tests/base_refcounted.flags » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/tests/base_refcounted.cpp
diff --git a/tools/clang/plugins/tests/base_refcounted.cpp b/tools/clang/plugins/tests/base_refcounted.cpp
deleted file mode 100644
index 46e8975c597c46558be8728c094bf68d8db310fa..0000000000000000000000000000000000000000
--- a/tools/clang/plugins/tests/base_refcounted.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base_refcounted.h"
-
-#include <cstddef>
-
-namespace {
-
-// Unsafe; should error.
-class AnonymousDerivedProtectedToPublicInImpl
- : public ProtectedRefCountedVirtualDtorInHeader {
- public:
- AnonymousDerivedProtectedToPublicInImpl() {}
- ~AnonymousDerivedProtectedToPublicInImpl() override {}
-};
-
-// Unsafe; but we should only warn on the base class.
-class AnonymousDerivedProtectedOnDerived
- : public ProtectedRefCountedDtorInHeader {
- protected:
- ~AnonymousDerivedProtectedOnDerived() {}
-};
-
-} // namespace
-
-// Unsafe; should error.
-class PublicRefCountedDtorInImpl
- : public base::RefCounted<PublicRefCountedDtorInImpl> {
- public:
- PublicRefCountedDtorInImpl() {}
- ~PublicRefCountedDtorInImpl() {}
-
- private:
- friend class base::RefCounted<PublicRefCountedDtorInImpl>;
-};
-
-class Foo {
- public:
- class BarInterface {
- protected:
- virtual ~BarInterface() {}
- };
-
- typedef base::RefCounted<BarInterface> RefCountedBar;
- typedef RefCountedBar AnotherTypedef;
-};
-
-class Baz {
- public:
- typedef typename Foo::AnotherTypedef MyLocalTypedef;
-};
-
-// Unsafe; should error.
-class UnsafeTypedefChainInImpl : public Baz::MyLocalTypedef {
- public:
- UnsafeTypedefChainInImpl() {}
- ~UnsafeTypedefChainInImpl() {}
-};
-
-int main() {
- PublicRefCountedDtorInHeader bad;
- PublicRefCountedDtorInImpl also_bad;
-
- ProtectedRefCountedDtorInHeader* even_badder = NULL;
- PrivateRefCountedDtorInHeader* private_ok = NULL;
-
- DerivedProtectedToPublicInHeader still_bad;
- PublicRefCountedThreadSafeDtorInHeader another_bad_variation;
- AnonymousDerivedProtectedToPublicInImpl and_this_is_bad_too;
- ImplicitDerivedProtectedToPublicInHeader bad_yet_again;
- UnsafeTypedefChainInImpl and_again_this_is_bad;
-
- WebKitPublicDtorInHeader ignored;
- WebKitDerivedPublicDtorInHeader still_ignored;
-
- return 0;
-}
« no previous file with comments | « tools/clang/plugins/tests/base_refcounted.h ('k') | tools/clang/plugins/tests/base_refcounted.flags » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698