[cfe-commits] r59620 - /cfe/trunk/test/Analysis/uninit-vals-ps.c

Zhongxing Xu xuzhongxing at gmail.com
Wed Nov 19 16:43:24 PST 2008


On Thu, Nov 20, 2008 at 1:57 AM, Ted Kremenek <kremenek at apple.com> wrote:

> 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).


Sorry I forgot that again. I should take a look at the test script.


>
> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081120/cfa8664e/attachment.html>


More information about the cfe-commits mailing list