[cfe-commits] r59620 - /cfe/trunk/test/Analysis/uninit-vals-ps.c
Ted Kremenek
kremenek at apple.com
Wed Nov 19 09:57:12 PST 2008
Hi Zhongxing,
Please split the RegionStore specific test cases into a separate
file. It's easier to follow, and having the RUN line in the middle of
the file is easy for people to miss.
BTW, the reason we tie run lines together with '&&' is because without
it the error code of the test is only the last RUN line (as opposed to
being the conjunction).
Ted
On Nov 19, 2008, at 3:10 AM, Zhongxing Xu wrote:
> Author: zhongxingxu
> Date: Wed Nov 19 05:10:42 2008
> New Revision: 59620
>
> URL: http://llvm.org/viewvc/llvm-project?rev=59620&view=rev
> Log:
> Add test for path-sensitive uninit-val detection involving struct
> field.
>
> Modified:
> cfe/trunk/test/Analysis/uninit-vals-ps.c
>
> Modified: cfe/trunk/test/Analysis/uninit-vals-ps.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/uninit-vals-ps.c?rev=59620&r1=59619&r2=59620&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/test/Analysis/uninit-vals-ps.c (original)
> +++ cfe/trunk/test/Analysis/uninit-vals-ps.c Wed Nov 19 05:10:42 2008
> @@ -41,3 +41,21 @@
> else
> return 1;
> }
> +
> +// RUN: clang -checker-simple -analyzer-store-region -verify %s
> +
> +struct s {
> + int data;
> +};
> +
> +struct s global;
> +
> +void g(int);
> +
> +void f4() {
> + int a;
> + if (global.data == 0)
> + a = 3;
> + if (global.data == 0)
> + g(a); // no-warning
> +}
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list