[cfe-commits] Patch for review

Ben Laurie benl at google.com
Tue Feb 17 11:25:34 PST 2009


On Tue, Feb 17, 2009 at 7:21 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Feb 17, 2009, at 2:23 AM, Ben Laurie wrote:
>
>> Don't include alloca.h if it doesn't exist.
>
> Ideally the analyzer test cases wouldn't use the system assert.  Why not
> have an analyzer-specific assert.h that "is defined right"?

Sure. That wouldn't fix the problem with alloca.h, though :-)

>
> -Chris
>
>>
>>
>> Index: test/Analysis/stack-addr-ps.c
>> ===================================================================
>> --- test/Analysis/stack-addr-ps.c       (revision 64650)
>> +++ test/Analysis/stack-addr-ps.c       (working copy)
>> @@ -1,9 +1,12 @@
>> -// RUN: clang -analyze -checker-simple -verify %s &&
>> -// RUN: clang -analyze -checker-cfref -analyzer-store-basic -verify %s &&
>> -// RUN: clang -analyze -checker-cfref -analyzer-store-region -verify %s
>> +// RUN: clang -analyze -checker-simple -verify -I../../../include %s &&
>> +// RUN: clang -analyze -checker-cfref -analyzer-store-basic -verify
>> -I../../../include %s &&
>> +// RUN: clang -analyze -checker-cfref -analyzer-store-region -verify
>> -I../../../include %s
>>
>> #include <stdlib.h>
>> -#include <alloca.h>
>> +#include <llvm/Config/config.h>
>> +#ifdef HAVE_ALLOCA_H
>> +# include <alloca.h>
>> +#endif
>>
>> int* f1() {
>>  int x = 0;
>> _______________________________________________
>> 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