Chromium Code Reviews| Index: tools/clang/rewrite_scoped_refptr/tests/test14-original.cc |
| diff --git a/tools/clang/rewrite_scoped_refptr/tests/test10-expected.cc b/tools/clang/rewrite_scoped_refptr/tests/test14-original.cc |
| similarity index 56% |
| copy from tools/clang/rewrite_scoped_refptr/tests/test10-expected.cc |
| copy to tools/clang/rewrite_scoped_refptr/tests/test14-original.cc |
| index a74cd7df9336d8cb9a80f3b4952beb6cea30c6df..c81503ce4a02e9c1907c2d8b508adbfcb8a7899c 100644 |
| --- a/tools/clang/rewrite_scoped_refptr/tests/test10-expected.cc |
| +++ b/tools/clang/rewrite_scoped_refptr/tests/test14-original.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()) {} |
| + Foo* f_; |
|
mdempsky
2014/08/08 21:59:28
What about adding code that accesses this f_ to ma
dcheng
2014/08/09 21:00:21
Hmm. The only code that would break is boolean tes
|
| +}; |