Index: tools/clang/rewrite_scoped_refptr/tests/temp-assigned-to-field-init-expected.cc |
diff --git a/tools/clang/rewrite_scoped_refptr/tests/test10-expected.cc b/tools/clang/rewrite_scoped_refptr/tests/temp-assigned-to-field-init-expected.cc |
similarity index 54% |
copy from tools/clang/rewrite_scoped_refptr/tests/test10-expected.cc |
copy to tools/clang/rewrite_scoped_refptr/tests/temp-assigned-to-field-init-expected.cc |
index a74cd7df9336d8cb9a80f3b4952beb6cea30c6df..1067dbab34a16aa9ce1ab38afa88d5fd05c6a1e0 100644 |
--- a/tools/clang/rewrite_scoped_refptr/tests/test10-expected.cc |
+++ b/tools/clang/rewrite_scoped_refptr/tests/temp-assigned-to-field-init-expected.cc |
@@ -8,9 +8,12 @@ struct Foo { |
int dummy; |
}; |
-int TestsAScopedRefptr() { |
- scoped_refptr<Foo> foo(new Foo); |
- if (foo.get()) |
- return 1; |
- return 0; |
+// Similar to case 2, but with a field initializer. |
+scoped_refptr<Foo> GetBuggyFoo() { |
+ return new Foo; |
} |
+ |
+class ABuggyCtor { |
+ ABuggyCtor() : f_(GetBuggyFoo()) {} |
+ scoped_refptr<Foo> f_; |
+}; |