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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/FindBadConstructsConsumer.cpp ('k') | tools/clang/plugins/tests/weak_ptr_factory.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/tests/weak_ptr_factory.cpp
diff --git a/tools/clang/plugins/tests/weak_ptr_factory.cpp b/tools/clang/plugins/tests/weak_ptr_factory.cpp
index 79c23b473880170a6297ba538a1756383f43a845..50de97c028f0fd8bfffac95e287aa4702df38035 100644
--- a/tools/clang/plugins/tests/weak_ptr_factory.cpp
+++ b/tools/clang/plugins/tests/weak_ptr_factory.cpp
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "weak_ptr_factory.h"
+
namespace should_succeed {
class OnlyMember {
@@ -27,6 +28,13 @@ class FirstFactoryRefersToOtherType {
base::WeakPtrFactory<FirstFactoryRefersToOtherType> factory_;
};
+class TwoFactories {
+ bool bool_member_;
+ int int_member_;
+ base::WeakPtrFactory<TwoFactories> factory1_;
+ base::WeakPtrFactory<TwoFactories> factory2_;
+};
+
} // namespace should_succeed
namespace should_fail {
@@ -42,6 +50,13 @@ class FactoryMiddle {
int int_member_;
};
+class TwoFactoriesOneBad {
+ bool bool_member_;
+ base::WeakPtrFactory<TwoFactoriesOneBad> factory1_;
+ int int_member_;
+ base::WeakPtrFactory<TwoFactoriesOneBad> factory2_;
+};
+
} // namespace should_fail
int main() {
« no previous file with comments | « tools/clang/plugins/FindBadConstructsConsumer.cpp ('k') | tools/clang/plugins/tests/weak_ptr_factory.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698