OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "scoped_refptr.h" |
| 6 |
| 7 struct Foo { |
| 8 int dummy; |
| 9 }; |
| 10 |
| 11 // Similar to case 2, except the result is being used in a boolean test. This |
| 12 // doesn't result in memory safety issues but it could be easily argued that |
| 13 // this is a bad way to structure the code. The tool should ignore this case so |
| 14 // that it can be manually handled by human intervention. |
| 15 scoped_refptr<Foo> GetBuggyFoo() { |
| 16 return new Foo; |
| 17 } |
| 18 void UseBuggyFoo() { |
| 19 if (GetBuggyFoo()) |
| 20 return; |
| 21 } |
OLD | NEW |