[cfe-commits] r80700 - /cfe/trunk/test/Analysis/retain-release.m

Daniel Dunbar daniel at zuster.org
Mon Sep 21 18:59:16 PDT 2009


On Mon, Sep 21, 2009 at 2:05 PM, Ted Kremenek <kremenek at apple.com> wrote:
>
> On Sep 20, 2009, at 12:13 AM, Daniel Dunbar wrote:
>
> Hi Ted,
>
> On Tue, Sep 1, 2009 at 11:33 AM, Ted Kremenek <kremenek at apple.com> wrote:
>
> Author: kremenek
>
> Date: Tue Sep  1 13:33:16 2009
>
> New Revision: 80700
>
> URL: http://llvm.org/viewvc/llvm-project?rev=80700&view=rev
>
> Log:
>
> Add test case from <rdar://problem/7184450>.
>
> This is a super nit-pick, but could these tests be more reduced?
>
> The problem with auto reduced test cases which aren't reduced to the
> real bug is that they are hard to read, but the real issue is that
> because the test case doesn't *really* show the problem, when things
> change in the future and a test needs updating, it can be impossible
> to tell whether it is testing what it is supposed to anymore.
>
> Hi Daniel,
> The only thing that is autoreduced are the forward declarations (at the top
> of the patch).  The actual test case was hand reduced (at the bottom).
> Ted

Ok, then I think my request is to hand reduce harder. :)

I suspect the minimal test case is not very far from:
--
extern CGColorSpaceRef CGColorSpaceCreateDeviceRGB(void);
int rdar_7184450() {
  CGColorSpaceCreateDeviceRGB(); // expected-warning {{leak}}
}
--
which makes it very clear what the test is testing.

 - Daniel




More information about the cfe-commits mailing list